Skip to content

Commit

Permalink
x86: vsyscall: Use NULL instead 0 for a pointer argument
Browse files Browse the repository at this point in the history
This patch silences the following sparse warning:
arch/x86/kernel/vsyscall_64.c:250:34:
       warning: Using plain integer as NULL pointer

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Acked-by: Andy Lutomirski <luto@amacapital.net>
Cc: john.stultz@linaro.org
Link: http://lkml.kernel.org/r/1333306084-3776-1-git-send-email-emilgoode@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Emil Goode authored and Thomas Gleixner committed Apr 6, 2012
1 parent dba69d1 commit 46ed99d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/x86/kernel/vsyscall_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
current_thread_info()->sig_on_uaccess_error = 1;

/*
* 0 is a valid user pointer (in the access_ok sense) on 32-bit and
* NULL is a valid user pointer (in the access_ok sense) on 32-bit and
* 64-bit, so we don't need to special-case it here. For all the
* vsyscalls, 0 means "don't write anything" not "write it at
* vsyscalls, NULL means "don't write anything" not "write it at
* address 0".
*/
ret = -EFAULT;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 46ed99d

Please sign in to comment.