All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] samples/hw_breakpoint: mark sample_hbp as static
@ 2022-10-18 21:25 Chen Jiahao
  0 siblings, 0 replies; 3+ messages in thread
From: Chen Jiahao @ 2022-10-18 21:25 UTC (permalink / raw)
  To: fweisbec, tj, linux-kernel

There is a sparse warning shown 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 418c46fe5ffc..37c4f0ea8e53 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.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] samples/hw_breakpoint: mark sample_hbp as static
  2023-07-26 10:17 Chen Jiahao
@ 2023-07-26 18:18 ` Luis Chamberlain
  0 siblings, 0 replies; 3+ messages in thread
From: Luis Chamberlain @ 2023-07-26 18:18 UTC (permalink / raw)
  To: Chen Jiahao; +Cc: linux-kernel, tj, fweisbec, pmladek, rongtao

On Wed, Jul 26, 2023 at 10:17:59AM +0000, Chen Jiahao wrote:
> 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>

Thanks, applied and pushed.

  Luis

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH -next] samples/hw_breakpoint: mark sample_hbp as static
@ 2023-07-26 10:17 Chen Jiahao
  2023-07-26 18:18 ` Luis Chamberlain
  0 siblings, 1 reply; 3+ messages in thread
From: Chen Jiahao @ 2023-07-26 10:17 UTC (permalink / raw)
  To: linux-kernel, tj, fweisbec, pmladek, rongtao, mcgrof; +Cc: chenjiahao16

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-26 18:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-18 21:25 [PATCH -next] samples/hw_breakpoint: mark sample_hbp as static Chen Jiahao
2023-07-26 10:17 Chen Jiahao
2023-07-26 18:18 ` Luis Chamberlain

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.