aboutsummaryrefslogtreecommitdiff
path: root/hw/misc
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/misc
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/misc')
-rw-r--r--hw/misc/ivshmem.c3
-rw-r--r--hw/misc/pci-testdev.c2
-rw-r--r--hw/misc/vfio.c7
3 files changed, 0 insertions, 12 deletions
diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 768e5288bc..156edd2f17 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -789,11 +789,8 @@ static void pci_ivshmem_uninit(PCIDevice *dev)
error_free(s->migration_blocker);
}
- memory_region_destroy(&s->ivshmem_mmio);
memory_region_del_subregion(&s->bar, &s->ivshmem);
vmstate_unregister_ram(&s->ivshmem, DEVICE(dev));
- memory_region_destroy(&s->ivshmem);
- memory_region_destroy(&s->bar);
unregister_savevm(DEVICE(dev), "ivshmem", s);
}
diff --git a/hw/misc/pci-testdev.c b/hw/misc/pci-testdev.c
index ca53b3f500..c78a63e3a7 100644
--- a/hw/misc/pci-testdev.c
+++ b/hw/misc/pci-testdev.c
@@ -293,8 +293,6 @@ pci_testdev_uninit(PCIDevice *dev)
g_free(d->tests[i].hdr);
}
g_free(d->tests);
- memory_region_destroy(&d->mmio);
- memory_region_destroy(&d->portio);
}
static void qdev_pci_testdev_reset(DeviceState *dev)
diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index af9ae1fedf..813c2cc5c5 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -2857,15 +2857,11 @@ static void vfio_unmap_bar(VFIODevice *vdev, int nr)
memory_region_del_subregion(&bar->mem, &bar->mmap_mem);
munmap(bar->mmap, memory_region_size(&bar->mmap_mem));
- memory_region_destroy(&bar->mmap_mem);
if (vdev->msix && vdev->msix->table_bar == nr) {
memory_region_del_subregion(&bar->mem, &vdev->msix->mmap_mem);
munmap(vdev->msix->mmap, memory_region_size(&vdev->msix->mmap_mem));
- memory_region_destroy(&vdev->msix->mmap_mem);
}
-
- memory_region_destroy(&bar->mem);
}
static int vfio_mmap_bar(VFIODevice *vdev, VFIOBAR *bar,
@@ -3018,9 +3014,6 @@ static void vfio_unmap_bars(VFIODevice *vdev)
if (vdev->has_vga) {
vfio_vga_quirk_teardown(vdev);
pci_unregister_vga(&vdev->pdev);
- memory_region_destroy(&vdev->vga.region[QEMU_PCI_VGA_MEM].mem);
- memory_region_destroy(&vdev->vga.region[QEMU_PCI_VGA_IO_LO].mem);
- memory_region_destroy(&vdev->vga.region[QEMU_PCI_VGA_IO_HI].mem);
}
}