lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210508031441.53349-1-cuibixuan@huawei.com>
Date:   Sat, 8 May 2021 11:14:41 +0800
From:   Bixuan Cui <cuibixuan@...wei.com>
To:     <cuibixuan@...wei.com>
CC:     <linux-kernel@...r.kernel.org>, <kernel-janitors@...r.kernel.org>
Subject: [PATCH -next] locking/static_keys: Make some symbols static

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@...wei.com>
Signed-off-by: Bixuan Cui <cuibixuan@...wei.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;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ