mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] kernel: pid_namespace : fix warning Using plain integer as NULL pointer
@ 2019-04-06 10:48 Hariprasad Kelam
  2019-04-06 19:12 ` Mukesh Ojha
  0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Kelam @ 2019-04-06 10:48 UTC (permalink / raw)
  To: Eric W. Biederman, Thomas Gleixner, linux-kernel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-06 19:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-06 10:48 [PATCH] kernel: pid_namespace : fix warning Using plain integer as NULL pointer Hariprasad Kelam
2019-04-06 19:12 ` Mukesh Ojha

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®