summary refs log tree commit diff stats
path: root/hw/pci
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/pci
parentd8d95814609e89e5438a3318a647ec322fc4ff16 (diff)
downloadfocaccia-qemu-469b046ead0671932ff3af8d6f95045b19b186ef.tar.gz
focaccia-qemu-469b046ead0671932ff3af8d6f95045b19b186ef.zip
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/pci')
-rw-r--r--hw/pci/msix.c4
-rw-r--r--hw/pci/pci.c2
-rw-r--r--hw/pci/pci_bridge.c8
-rw-r--r--hw/pci/pcie_host.c1
-rw-r--r--hw/pci/shpc.c1
5 files changed, 0 insertions, 16 deletions
diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index 5c49bfc304..3c07d226b2 100644
--- a/hw/pci/msix.c
+++ b/hw/pci/msix.c
@@ -319,7 +319,6 @@ int msix_init_exclusive_bar(PCIDevice *dev, unsigned short nentries,
                     bar_nr, MSIX_EXCLUSIVE_BAR_PBA_OFFSET,
                     MSIX_EXCLUSIVE_CAP_OFFSET);
     if (ret) {
-        memory_region_destroy(&dev->msix_exclusive_bar);
         return ret;
     }
 
@@ -359,11 +358,9 @@ void msix_uninit(PCIDevice *dev, MemoryRegion *table_bar, MemoryRegion *pba_bar)
     msix_free_irq_entries(dev);
     dev->msix_entries_nr = 0;
     memory_region_del_subregion(pba_bar, &dev->msix_pba_mmio);
-    memory_region_destroy(&dev->msix_pba_mmio);
     g_free(dev->msix_pba);
     dev->msix_pba = NULL;
     memory_region_del_subregion(table_bar, &dev->msix_table_mmio);
-    memory_region_destroy(&dev->msix_table_mmio);
     g_free(dev->msix_table);
     dev->msix_table = NULL;
     g_free(dev->msix_entry_used);
@@ -375,7 +372,6 @@ void msix_uninit_exclusive_bar(PCIDevice *dev)
 {
     if (msix_present(dev)) {
         msix_uninit(dev, &dev->msix_exclusive_bar, &dev->msix_exclusive_bar);
-        memory_region_destroy(&dev->msix_exclusive_bar);
     }
 }
 
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 351d320470..daeaeac85a 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -799,7 +799,6 @@ static void do_pci_unregister_device(PCIDevice *pci_dev)
     pci_config_free(pci_dev);
 
     address_space_destroy(&pci_dev->bus_master_as);
-    memory_region_destroy(&pci_dev->bus_master_enable_region);
 }
 
 /* -1 for devfn means auto assign */
@@ -1996,7 +1995,6 @@ static void pci_del_option_rom(PCIDevice *pdev)
         return;
 
     vmstate_unregister_ram(&pdev->rom, &pdev->qdev);
-    memory_region_destroy(&pdev->rom);
     pdev->has_rom = false;
 }
 
diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index 4becdc14b8..13072655f5 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -219,12 +219,6 @@ static void pci_bridge_region_del(PCIBridge *br, PCIBridgeWindows *w)
 
 static void pci_bridge_region_cleanup(PCIBridge *br, PCIBridgeWindows *w)
 {
-    memory_region_destroy(&w->alias_io);
-    memory_region_destroy(&w->alias_mem);
-    memory_region_destroy(&w->alias_pref_mem);
-    memory_region_destroy(&w->alias_vga[QEMU_PCI_VGA_IO_LO]);
-    memory_region_destroy(&w->alias_vga[QEMU_PCI_VGA_IO_HI]);
-    memory_region_destroy(&w->alias_vga[QEMU_PCI_VGA_MEM]);
     g_free(w);
 }
 
@@ -389,8 +383,6 @@ void pci_bridge_exitfn(PCIDevice *pci_dev)
     QLIST_REMOVE(&s->sec_bus, sibling);
     pci_bridge_region_del(s, s->windows);
     pci_bridge_region_cleanup(s, s->windows);
-    memory_region_destroy(&s->address_space_mem);
-    memory_region_destroy(&s->address_space_io);
     /* object_unparent() is called automatically during device deletion */
 }
 
diff --git a/hw/pci/pcie_host.c b/hw/pci/pcie_host.c
index 7c88a1d091..3db038fc7f 100644
--- a/hw/pci/pcie_host.c
+++ b/hw/pci/pcie_host.c
@@ -94,7 +94,6 @@ void pcie_host_mmcfg_unmap(PCIExpressHost *e)
 {
     if (e->base_addr != PCIE_BASE_ADDR_UNMAPPED) {
         memory_region_del_subregion(get_system_memory(), &e->mmio);
-        memory_region_destroy(&e->mmio);
         e->base_addr = PCIE_BASE_ADDR_UNMAPPED;
     }
 }
diff --git a/hw/pci/shpc.c b/hw/pci/shpc.c
index 180faa7adb..1fcb8c4d85 100644
--- a/hw/pci/shpc.c
+++ b/hw/pci/shpc.c
@@ -667,7 +667,6 @@ void shpc_cleanup(PCIDevice *d, MemoryRegion *bar)
     g_free(shpc->cmask);
     g_free(shpc->wmask);
     g_free(shpc->w1cmask);
-    memory_region_destroy(&shpc->mmio);
     g_free(shpc);
 }