From 469b046ead0671932ff3af8d6f95045b19b186ef Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 11 Jun 2014 12:50:43 +0200 Subject: memory: remove memory_region_destroy The function is empty after the previous patch, so remove it. Reviewed-by: Peter Crosthwaite Signed-off-by: Paolo Bonzini --- hw/pci/msix.c | 4 ---- hw/pci/pci.c | 2 -- hw/pci/pci_bridge.c | 8 -------- hw/pci/pcie_host.c | 1 - hw/pci/shpc.c | 1 - 5 files changed, 16 deletions(-) (limited to 'hw/pci') diff --git a/hw/pci/msix.c b/hw/pci/msix.c index 5c49bfc..3c07d22 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 351d320..daeaeac 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 4becdc1..1307265 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 7c88a1d..3db038f 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 180faa7..1fcb8c4 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); } -- cgit v1.1