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

[Xen-devel] [PATCH] Fix non-debug build after c/s 23767:80e9fcdaef36



The hd variable in iommu_update_pde_count() and iommu_merge_pages() is
only used in the ASSERT, causing gcc to complain about the variable being
unused in non-debug builds.

Only define the variable for debug builds.

Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>

diff -r 2029263c501c -r ac4de6b4c457 xen/drivers/passthrough/amd/iommu_map.c
--- a/xen/drivers/passthrough/amd/iommu_map.c   Mon Aug 22 10:12:36 2011 +0100
+++ b/xen/drivers/passthrough/amd/iommu_map.c   Mon Aug 22 12:54:42 2011 +0100
@@ -462,7 +462,9 @@ static int iommu_update_pde_count(struct
     unsigned long first_mfn;
     u64 *table, *pde, *ntable;
     u64 ntable_maddr, mask;
+#ifndef NDEBUG
     struct hvm_iommu *hd = domain_hvm_iommu(d);
+#endif
     bool_t ok = 0;
 
     ASSERT( spin_is_locked(&hd->mapping_lock) && pt_mfn );
@@ -517,7 +519,9 @@ static int iommu_merge_pages(struct doma
     u64 *table, *pde, *ntable;
     u64 ntable_mfn;
     unsigned long first_mfn;
+#ifndef NDEBUG
     struct hvm_iommu *hd = domain_hvm_iommu(d);
+#endif
 
     ASSERT( spin_is_locked(&hd->mapping_lock) && pt_mfn );
 

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


 


Rackspace

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