Skip to contentSkip to conversation

pci-iommu_table.c: quiet sparse noise about plain integer as NULL pointer

PATCH New H Hartley Sweeten 1 participant 1 message Sep 9, 2011 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci-iommu_table.c: quiet sparse noise about plain integer as NULL pointer

x->depend is an initcall_t, NULL should be used to zero it, not 0. This quiets the following sparse noise:

warning: Using plain integer as NULL pointer

Cc Thomas Gleixner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc Joe Perches <[email protected]>
Cc Joerg Roedel <[email protected]>

---

arch/x86/kernel/pci-iommu_table.c +1 -1
index 35ccf75..75c3c40 100644
@@ -59,7 +59,7 @@ void __init check_iommu_entries(struct iommu_table_entry *start,
 			printk(KERN_ERR "CYCLIC DEPENDENCY FOUND! %pS depends on %pS and vice-versa. BREAKING IT.\n",
 			       p->detect, q->detect);
 			/* Heavy handed way..*/
-			x->depend = 0;
+			x->depend = NULL;
 		}
 	}