]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
user.c: make uidhash_table static
authorJason Yan <yanaijie@huawei.com>
Thu, 4 Jun 2020 23:49:58 +0000 (16:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Jun 2020 02:06:24 +0000 (19:06 -0700)
Fix the following sparse warning:

  kernel/user.c:85:19: warning: symbol 'uidhash_table' was not declared.
  Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: David Howells <dhowells@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20200413082146.22737-1-yanaijie@huawei.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/user.c

index 5235d7f49982e5e228256fe01b96164c41aa7b82..b1635d94a1f246185c740cd268303beb609de8bf 100644 (file)
@@ -82,7 +82,7 @@ EXPORT_SYMBOL_GPL(init_user_ns);
 #define uidhashentry(uid)      (uidhash_table + __uidhashfn((__kuid_val(uid))))
 
 static struct kmem_cache *uid_cachep;
-struct hlist_head uidhash_table[UIDHASH_SZ];
+static struct hlist_head uidhash_table[UIDHASH_SZ];
 
 /*
  * The uidhash_lock is mostly taken from process context, but it is