From: Bixuan Cui <cuibixuan@huawei.com>
To: <cuibixuan@huawei.com>
Cc: <linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: [PATCH -next] locking/static_keys: Make some symbols static
Date: Sat, 8 May 2021 11:14:41 +0800 [thread overview]
Message-ID: <20210508031441.53349-1-cuibixuan@huawei.com> (raw)
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;
reply other threads:[~2021-05-08 1:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210508031441.53349-1-cuibixuan@huawei.com \
--to=cuibixuan@huawei.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).