samples/hw_breakpoint: set variable sample_hbp storage-class-specifier to static
PATCH 1/1 samples/hw_breakpoint: set variable sample_hbp storage-class-specifier to static
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 <[email protected]>
--- samples/hw_breakpoint/data_breakpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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 );
Signature · 1 line
2.27.0