From: Chen Jiahao <chenjiahao16@huawei.com>
To: <linux-kernel@vger.kernel.org>, <tj@kernel.org>,
<fweisbec@gmail.com>, <pmladek@suse.com>, <rongtao@cestc.cn>,
<mcgrof@kernel.org>
Cc: <chenjiahao16@huawei.com>
Subject: [PATCH -next] samples/hw_breakpoint: mark sample_hbp as static
Date: Wed, 26 Jul 2023 10:17:59 +0000 [thread overview]
Message-ID: <20230726101759.2537372-1-chenjiahao16@huawei.com> (raw)
There is a sparse warning shown as below:
samples/hw_breakpoint/data_breakpoint.c:24:19: warning:
symbol 'sample_hbp' was not declared. Should it be static?
Since 'sample_hbp' is only called within data_breakpoint.c,
mark it as static to fix the warning.
Fixes: 44ee63587dce ("percpu: Add __percpu sparse annotations to hw_breakpoint")
Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com>
---
samples/hw_breakpoint/data_breakpoint.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/hw_breakpoint/data_breakpoint.c b/samples/hw_breakpoint/data_breakpoint.c
index 9debd128b2ab..2f64b89f14da 100644
--- a/samples/hw_breakpoint/data_breakpoint.c
+++ b/samples/hw_breakpoint/data_breakpoint.c
@@ -21,7 +21,7 @@
#include <linux/perf_event.h>
#include <linux/hw_breakpoint.h>
-struct perf_event * __percpu *sample_hbp;
+static struct perf_event * __percpu *sample_hbp;
static char ksym_name[KSYM_NAME_LEN] = "jiffies";
module_param_string(ksym, ksym_name, KSYM_NAME_LEN, S_IRUGO);
--
2.34.1
next reply other threads:[~2023-07-26 10:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 10:17 Chen Jiahao [this message]
2023-07-26 18:18 ` Luis Chamberlain
-- strict thread matches above, loose matches on Subject: below --
2022-10-18 21:25 Chen Jiahao
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=20230726101759.2537372-1-chenjiahao16@huawei.com \
--to=chenjiahao16@huawei.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=pmladek@suse.com \
--cc=rongtao@cestc.cn \
--cc=tj@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
all inboxes | Powered by JetHome®