Patchwork [v3,8/8] msix: Switch msix_uninit to return void

login
register
mail settings
Submitter Alex Williamson
Date June 14, 2012, 6:16 p.m.
Message ID <20120614181656.23440.43744.stgit@bling.home>
Download mbox | patch
Permalink /patch/164993/
State New
Headers show

Comments

Alex Williamson - June 14, 2012, 6:16 p.m.
It can't fail.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---

 hw/msix.c |    6 +++---
 hw/msix.h |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

Patch

diff --git a/hw/msix.c b/hw/msix.c
index 15f8d7d..fd9ea95 100644
--- a/hw/msix.c
+++ b/hw/msix.c
@@ -328,10 +328,10 @@  static void msix_free_irq_entries(PCIDevice *dev)
 }
 
 /* Clean up resources for the device. */
-int msix_uninit(PCIDevice *dev, MemoryRegion *table_bar, MemoryRegion *pba_bar)
+void msix_uninit(PCIDevice *dev, MemoryRegion *table_bar, MemoryRegion *pba_bar)
 {
     if (!msix_present(dev)) {
-        return 0;
+        return;
     }
     pci_del_capability(dev, PCI_CAP_ID_MSIX, MSIX_CAP_LENGTH);
     dev->msix_cap = 0;
@@ -348,7 +348,7 @@  int msix_uninit(PCIDevice *dev, MemoryRegion *table_bar, MemoryRegion *pba_bar)
     g_free(dev->msix_entry_used);
     dev->msix_entry_used = NULL;
     dev->cap_present &= ~QEMU_PCI_CAP_MSIX;
-    return 0;
+    return;
 }
 
 void msix_uninit_exclusive_bar(PCIDevice *dev)
diff --git a/hw/msix.h b/hw/msix.h
index f637797..1786e27 100644
--- a/hw/msix.h
+++ b/hw/msix.h
@@ -13,8 +13,8 @@  int msix_init_exclusive_bar(PCIDevice *dev, unsigned short nentries,
 
 void msix_write_config(PCIDevice *dev, uint32_t address, uint32_t val, int len);
 
-int msix_uninit(PCIDevice *dev, MemoryRegion *table_bar,
-                MemoryRegion *pba_bar);
+void msix_uninit(PCIDevice *dev, MemoryRegion *table_bar,
+                 MemoryRegion *pba_bar);
 void msix_uninit_exclusive_bar(PCIDevice *dev);
 
 unsigned int msix_nr_vectors_allocated(const PCIDevice *dev);