Skip to contentSkip to conversation

samsung-laptop: fix sparse warning

PATCH Applied Lad Prabhakar 2 participants 2 messages Feb 5, 2015 – Feb 7, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 samsung-laptop: fix sparse warning

From: "Lad, Prabhakar" <[email protected]>

this patch fixes following sparse warning:

samsung-laptop.c:1365:52: warning: Using plain integer as NULL pointer

---
Found this issue on linux-next (gcc version 4.9.2, sparse version 0.4.5-rc1)and applies on top linux-next.

 drivers/platform/x86/samsung-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/samsung-laptop.c +1 -1
index ce364a4..c3c31e0 100644
@@ -1362,7 +1362,7 @@ static int __init samsung_sabi_init(struct samsung_laptop *samsung)
 	samsung_sabi_diag(samsung);
 
 	/* Try to find one of the signatures in memory to find the header */
-	for (i = 0; sabi_configs[i].test_string != 0; ++i) {
+	for (i = 0; sabi_configs[i].test_string != NULL; ++i) {
 		samsung->config = &sabi_configs[i];
 		loca = find_signature(samsung->f0000_segment,
 				      samsung->config->test_string);
Signature · 1 line
1.9.1
Applied
#1 lore raw
Quoted 7 lines · Lad Prabhakar

From: "Lad, Prabhakar" <[email protected]>

this patch fixes following sparse warning:

samsung-laptop.c:1365:52: warning: Using plain integer as NULL pointer

Queued, thanks.

Signature · 2 lines
Darren Hart
Intel Open Source Technology Center