Skip to contentSkip to conversation

x86: should use NULL pointer to replace plain integer

PATCH New zhong jiang 2 participants 2 messages Jul 21, 2018 – Aug 2, 2018 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: should use NULL pointer to replace plain integer

Fixes the following sparse warnings:

arch/x86/kernel/pci-iommu_table.c:63:37: warning: Using plain integer as NULL pointer

---
 arch/x86/kernel/pci-iommu_table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/pci-iommu_table.c +1 -1
index 4dfd90a..2e9006c 100644
@@ -60,7 +60,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;
 		}
 	}
 
Signature · 1 line
1.7.12.4
#1 lore raw

[tip:x86/cleanups] x86/iommu: Use NULL instead of 0

x86/iommu: Use NULL instead of 0
Commit-ID:  0b2c1aec49ddb2260894df6c69ae7b34142ff936
Gitweb:     https://git.kernel.org/tip/0b2c1aec49ddb2260894df6c69ae7b34142ff936
Author:     Zhong Jiang <[email protected]>
AuthorDate: Sat, 21 Jul 2018 16:33:24 +0800
Committer:  Thomas Gleixner <[email protected]>
CommitDate: Thu, 2 Aug 2018 14:33:19 +0200

x86/iommu: Use NULL instead of 0

Fixes the following sparse warning:

arch/x86/kernel/pci-iommu_table.c:63:37: warning: Using plain integer as NULL pointer

---
 arch/x86/kernel/pci-iommu_table.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/pci-iommu_table.c +1 -1
index 4dfd90a75e63..2e9006c1e240 100644
@@ -60,7 +60,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;
 		}
 	}