Skip to contentSkip to conversation

Disregard my patch: x86, vsyscall: Fix sparse warning: Using plain integer as NULL

DISCUSSION Emil Goode 2 participants 2 messages Apr 1, 2012 Kernel janitors

lore
Share & tools
lore

Emil Goode

author
#0 lore raw

Please disregard my previous patch.
I missed the comment saying "0 is a valid user pointer".

Best regards,
Emil Goode

Quoted 22 lines · Emil Goode

This patch silences the following sparse warning:
arch/x86/kernel/vsyscall_64.c:250:34:
warning: Using plain integer as NULL pointer

---
 arch/x86/kernel/vsyscall_64.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/vsyscall_64.c +1 -1
index f386dc4..6170ff9 100644
@@ -247,7 +247,7 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
 
 		ret = sys_getcpu((unsigned __user *)regs->di,
 				 (unsigned __user *)regs->si,
-				 0);
+				 NULL);
 		break;
 	}
 
#1 lore raw
Quoted 2 lines · Emil Goode

Please disregard my previous patch.
I missed the comment saying "0 is a valid user pointer".

The comment could be changed to "NULL", though.

--Andy

Quoted 20 lines

Best regards,
Emil Goode

Quoted 15 lines · Emil Goode

This patch silences the following sparse warning:
arch/x86/kernel/vsyscall_64.c:250:34:
       warning: Using plain integer as NULL pointer

---
 arch/x86/kernel/vsyscall_64.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/vsyscall_64.c +0 -0
index f386dc4..6170ff9 100644
@@ -247,7 +247,7 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
 
Quoted 9 lines

arch/x86/kernel/vsyscall_64.c bool emulate_vsyscall(struct pt_regs *regs, unsigned long address) · line 253

Quoted 7 lines
arch/x86/kernel/vsyscall_64.c +1 -1
               ret = sys_getcpu((unsigned __user *)regs->di,
                                (unsigned __user *)regs->si,
-                              0);
+                              NULL);
               break;
       }
 

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html