Skip to contentSkip to conversation

samples/hw_breakpoint: make sample_hbp static

PATCH In review Jason Yan 2 participants 2 messages Apr 17, 2020

lore
Share & tools
lore

Jason Yan

author
#0 lore raw

PATCH 1/1 samples/hw_breakpoint: make sample_hbp static

Fix the following sparse warning:

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

---
 samples/hw_breakpoint/data_breakpoint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
samples/hw_breakpoint/data_breakpoint.c +1 -1
index 418c46fe5ffc..37c4f0ea8e53 100644
@@ -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);
Signature · 1 line
2.21.1
Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · Jason Yan

Fix the following sparse warning:

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

---
 samples/hw_breakpoint/data_breakpoint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
samples/hw_breakpoint/data_breakpoint.c +0 -0
index 418c46fe5ffc..37c4f0ea8e53 100644

samples/hw_breakpoint/data_breakpoint.c line 27

Quoted 8 lines
samples/hw_breakpoint/data_breakpoint.c +1 -1
@@ -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);

Will