Skip to content

Commit 4b49df6

Browse files
Chen Jiahaomcgrof
authored andcommitted
samples/hw_breakpoint: mark sample_hbp as static
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: 44ee635 ("percpu: Add __percpu sparse annotations to hw_breakpoint") Signed-off-by: Chen Jiahao <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent b908046 commit 4b49df6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples/hw_breakpoint/data_breakpoint.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <linux/perf_event.h>
2222
#include <linux/hw_breakpoint.h>
2323

24-
struct perf_event * __percpu *sample_hbp;
24+
static struct perf_event * __percpu *sample_hbp;
2525

2626
static char ksym_name[KSYM_NAME_LEN] = "jiffies";
2727
module_param_string(ksym, ksym_name, KSYM_NAME_LEN, S_IRUGO);

0 commit comments

Comments
 (0)