All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] samples/hw_breakpoint: set variable sample_hbp storage-class-specifier to static
@ 2023-04-06 19:56 Tom Rix
  0 siblings, 0 replies; only message in thread
From: Tom Rix @ 2023-04-06 19:56 UTC (permalink / raw)
  Cc: linux-kernel, Tom Rix

smatch reports
samples/hw_breakpoint/data_breakpoint.c:24:19: warning: symbol
  'sample_hbp' was not declared. Should it be static?

This variable is only used in one file so should be static.

Signed-off-by: Tom Rix <trix@redhat.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.27.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-06 19:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-06 19:56 [PATCH] samples/hw_breakpoint: set variable sample_hbp storage-class-specifier to static Tom Rix

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.