summaryrefslogtreecommitdiff
path: root/hw/xen
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-06-11 12:50:43 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2014-08-18 12:06:21 +0200
commit469b046ead0671932ff3af8d6f95045b19b186ef (patch)
tree2ea738741930efbd091bf7fc645ce785bd1ec7a1 /hw/xen
parentd8d95814609e89e5438a3318a647ec322fc4ff16 (diff)
memory: remove memory_region_destroy
The function is empty after the previous patch, so remove it. Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/xen')
-rw-r--r--hw/xen/xen_pt.c20
-rw-r--r--hw/xen/xen_pt_msi.c2
2 files changed, 0 insertions, 22 deletions
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index be4220b415..c1bf357154 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -453,25 +453,6 @@ static int xen_pt_register_regions(XenPCIPassthroughState *s)
return 0;
}
-static void xen_pt_unregister_regions(XenPCIPassthroughState *s)
-{
- XenHostPCIDevice *d = &s->real_device;
- int i;
-
- for (i = 0; i < PCI_NUM_REGIONS - 1; i++) {
- XenHostPCIIORegion *r = &d->io_regions[i];
-
- if (r->base_addr == 0 || r->size == 0) {
- continue;
- }
-
- memory_region_destroy(&s->bar[i]);
- }
- if (d->rom.base_addr && d->rom.size) {
- memory_region_destroy(&s->rom);
- }
-}
-
/* region mapping */
static int xen_pt_bar_from_region(XenPCIPassthroughState *s, MemoryRegion *mr)
@@ -810,7 +791,6 @@ static void xen_pt_unregister_device(PCIDevice *d)
/* delete all emulated config registers */
xen_pt_config_delete(s);
- xen_pt_unregister_regions(s);
memory_listener_unregister(&s->memory_listener);
memory_listener_unregister(&s->io_listener);
diff --git a/hw/xen/xen_pt_msi.c b/hw/xen/xen_pt_msi.c
index 12b4c4560c..9ed9321c9f 100644
--- a/hw/xen/xen_pt_msi.c
+++ b/hw/xen/xen_pt_msi.c
@@ -593,7 +593,6 @@ int xen_pt_msix_init(XenPCIPassthroughState *s, uint32_t base)
return 0;
error_out:
- memory_region_destroy(&msix->mmio);
g_free(s->msix);
s->msix = NULL;
return rc;
@@ -616,7 +615,6 @@ void xen_pt_msix_delete(XenPCIPassthroughState *s)
}
memory_region_del_subregion(&s->bar[msix->bar_index], &msix->mmio);
- memory_region_destroy(&msix->mmio);
g_free(s->msix);
s->msix = NULL;