From: tip-bot for Emil Goode <emilgoode@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, luto@amacapital.net, hpa@zytor.com,
mingo@kernel.org, emilgoode@gmail.com, tglx@linutronix.de
Subject: [tip:x86/urgent] x86: vsyscall: Use NULL instead 0 for a pointer argument
Date: Fri, 6 Apr 2012 03:03:49 -0700 [thread overview]
Message-ID: <tip-46ed99d1b7c92920ce9e313152522847647aae4f@git.kernel.org> (raw)
In-Reply-To: <1333306084-3776-1-git-send-email-emilgoode@gmail.com>
Commit-ID: 46ed99d1b7c92920ce9e313152522847647aae4f
Gitweb: http://git.kernel.org/tip/46ed99d1b7c92920ce9e313152522847647aae4f
Author: Emil Goode <emilgoode@gmail.com>
AuthorDate: Sun, 1 Apr 2012 20:48:04 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 6 Apr 2012 11:49:59 +0200
x86: vsyscall: Use NULL instead 0 for a pointer argument
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>
---
arch/x86/kernel/vsyscall_64.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/vsyscall_64.c b/arch/x86/kernel/vsyscall_64.c
index f386dc4..7515cf0 100644
--- a/arch/x86/kernel/vsyscall_64.c
+++ b/arch/x86/kernel/vsyscall_64.c
@@ -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;
@@ -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;
}
parent reply other threads:[~2012-04-06 10:04 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1333306084-3776-1-git-send-email-emilgoode@gmail.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-46ed99d1b7c92920ce9e313152522847647aae4f@git.kernel.org \
--to=emilgoode@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome