kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] locking/static_keys: Make some symbols static
@ 2021-05-08  3:14 Bixuan Cui
  0 siblings, 0 replies; only message in thread
From: Bixuan Cui @ 2021-05-08  3:14 UTC (permalink / raw)
  To: cuibixuan; +Cc: linux-kernel, kernel-janitors

The sparse tool complains as follows:

lib/test_static_keys.c:15:19: warning:
 symbol 'old_true_key' was not declared. Should it be static?
lib/test_static_keys.c:16:19: warning:
 symbol 'old_false_key' was not declared. Should it be static?
lib/test_static_keys.c:19:1: warning:
 symbol 'true_key' was not declared. Should it be static?
lib/test_static_keys.c:20:1: warning:
 symbol 'false_key' was not declared. Should it be static?

This symbol is not used outside of test_static_keys.c, so this
commit marks it static.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
---
 lib/test_static_keys.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/test_static_keys.c b/lib/test_static_keys.c
index 42daa74be029..17a185312097 100644
--- a/lib/test_static_keys.c
+++ b/lib/test_static_keys.c
@@ -12,12 +12,12 @@
 #include <linux/jump_label.h>
 
 /* old keys */
-struct static_key old_true_key	= STATIC_KEY_INIT_TRUE;
-struct static_key old_false_key	= STATIC_KEY_INIT_FALSE;
+static struct static_key old_true_key	= STATIC_KEY_INIT_TRUE;
+static struct static_key old_false_key	= STATIC_KEY_INIT_FALSE;
 
 /* new api */
-DEFINE_STATIC_KEY_TRUE(true_key);
-DEFINE_STATIC_KEY_FALSE(false_key);
+static DEFINE_STATIC_KEY_TRUE(true_key);
+static DEFINE_STATIC_KEY_FALSE(false_key);
 
 /* external */
 extern struct static_key base_old_true_key;


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-08  1:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08  3:14 [PATCH -next] locking/static_keys: Make some symbols static Bixuan Cui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).