[PATCH] locking/static_keys: make old_true_key and old_false_key static

From: Jason Yan
Date: Fri Apr 17 2020 - 03:13:33 EST


Fix the following sparse warning:

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?

Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Signed-off-by: Jason Yan <yanaijie@xxxxxxxxxx>
---
lib/test_static_keys.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/test_static_keys.c b/lib/test_static_keys.c
index 42daa74be029..41658c5bf770 100644
--- a/lib/test_static_keys.c
+++ b/lib/test_static_keys.c
@@ -12,8 +12,8 @@
#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);
--
2.21.1