[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] vtd cleanup: change some function return types to void



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1226401641 0
# Node ID 36bda0bb805f12e3abafa889070f0646a2b10a2e
# Parent  76e90ac5067ef71f60b68ea0515f7f0466be5dca
vtd cleanup: change some function return types to void

iommu_suspend(), iommu_resume(), iommu_enable() translation don't have
meaningful return values.  Changed their function types to void.

Signed-off-by: Allen Kay <allen.m.kay@xxxxxxxxx>
---
 xen/drivers/passthrough/vtd/iommu.c |   28 ++++++++++------------------
 xen/include/xen/iommu.h             |    4 ++--
 2 files changed, 12 insertions(+), 20 deletions(-)

diff -r 76e90ac5067e -r 36bda0bb805f xen/drivers/passthrough/vtd/iommu.c
--- a/xen/drivers/passthrough/vtd/iommu.c       Tue Nov 11 11:06:27 2008 +0000
+++ b/xen/drivers/passthrough/vtd/iommu.c       Tue Nov 11 11:07:21 2008 +0000
@@ -634,7 +634,7 @@ static int iommu_set_root_entry(struct i
     return 0;
 }
 
-static int iommu_enable_translation(struct iommu *iommu)
+static void iommu_enable_translation(struct iommu *iommu)
 {
     u32 sts;
     unsigned long flags;
@@ -661,7 +661,6 @@ static int iommu_enable_translation(stru
     /* Disable PMRs when VT-d engine takes effect per spec definition */
     disable_pmr(iommu);
     spin_unlock_irqrestore(&iommu->register_lock, flags);
-    return 0;
 }
 
 int iommu_disable_translation(struct iommu *iommu)
@@ -1046,8 +1045,7 @@ static int intel_iommu_domain_init(struc
         for_each_drhd_unit ( drhd )
         {
             iommu = drhd->iommu;
-            if ( iommu_enable_translation(iommu) )
-                return -EIO;
+            iommu_enable_translation(iommu);
         }
     }
 
@@ -1799,14 +1797,14 @@ static int intel_iommu_group_id(u8 bus, 
 }
 
 static u32 iommu_state[MAX_IOMMUS][MAX_IOMMU_REGS];
-int iommu_suspend(void)
+void iommu_suspend(void)
 {
     struct acpi_drhd_unit *drhd;
     struct iommu *iommu;
     u32    i;
 
     if ( !vtd_enabled )
-        return 0;
+        return;
 
     iommu_flush_all();
 
@@ -1824,18 +1822,16 @@ int iommu_suspend(void)
         iommu_state[i][DMAR_FEUADDR_REG] =
             (u32) dmar_readl(iommu->reg, DMAR_FEUADDR_REG);
     }
-
-    return 0;
-}
-
-int iommu_resume(void)
+}
+
+void iommu_resume(void)
 {
     struct acpi_drhd_unit *drhd;
     struct iommu *iommu;
     u32 i;
 
     if ( !vtd_enabled )
-        return 0;
+        return;
 
     iommu_flush_all();
 
@@ -1855,12 +1851,8 @@ int iommu_resume(void)
                     (u32) iommu_state[i][DMAR_FEADDR_REG]);
         dmar_writel(iommu->reg, DMAR_FEUADDR_REG,
                     (u32) iommu_state[i][DMAR_FEUADDR_REG]);
-
-        if ( iommu_enable_translation(iommu) )
-            return -EIO;
-    }
-
-    return 0;
+        iommu_enable_translation(iommu);
+    }
 }
 
 struct iommu_ops intel_iommu_ops = {
diff -r 76e90ac5067e -r 36bda0bb805f xen/include/xen/iommu.h
--- a/xen/include/xen/iommu.h   Tue Nov 11 11:06:27 2008 +0000
+++ b/xen/include/xen/iommu.h   Tue Nov 11 11:07:21 2008 +0000
@@ -110,7 +110,7 @@ void iommu_update_ire_from_apic(unsigned
 void iommu_update_ire_from_apic(unsigned int apic, unsigned int reg, unsigned 
int value);
 void iommu_update_ire_from_msi(struct msi_desc *msi_desc, struct msi_msg *msg);
 
-int iommu_suspend(void);
-int iommu_resume(void);
+void iommu_suspend(void);
+void iommu_resume(void);
 
 #endif /* _IOMMU_H_ */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.