From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org
Subject: [PATCH] kernel: pid_namespace : fix warning Using plain integer as NULL pointer
Date: Sat, 6 Apr 2019 16:18:28 +0530 [thread overview]
Message-ID: <20190406104828.GA26135@hari-Inspiron-1545> (raw)
changed passing function argument "0 to NULL" to fix below sparse
warning
kernel/pid_namespace.c:55:76: warning: Using plain integer as NULL
pointer
did changes to avoid checkpatch error "prefer a maximum 75 chars per
line"
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
kernel/pid_namespace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index aa6e72f..6e4afdc 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -52,7 +52,8 @@ static struct kmem_cache *create_pid_cachep(unsigned int level)
mutex_lock(&pid_caches_mutex);
/* Name collision forces to do allocation under mutex. */
if (!*pkc)
- *pkc = kmem_cache_create(name, len, 0, SLAB_HWCACHE_ALIGN, 0);
+ *pkc =
+ kmem_cache_create(name, len, 0, SLAB_HWCACHE_ALIGN, NULL);
mutex_unlock(&pid_caches_mutex);
/* current can fail, but someone else can succeed. */
return READ_ONCE(*pkc);
--
2.7.4
next reply other threads:[~2019-04-06 10:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-06 10:48 Hariprasad Kelam [this message]
2019-04-06 19:12 ` Mukesh Ojha
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=20190406104828.GA26135@hari-Inspiron-1545 \
--to=hariprasad.kelam@gmail.com \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.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
all inboxes | Powered by JetHome®