summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorChen Jiahao <chenjiahao16@huawei.com>2023-07-26 10:17:59 +0000
committerLuis Chamberlain <mcgrof@kernel.org>2023-07-26 11:17:19 -0700
commit4b49df654cd0d1c3c359fc0f52182943a650b746 (patch)
tree6fec7c9445d26332a7e5b6322c9e32f306520f5f /samples
parentb9080468caeddc58a91edd1c3a7d212ea82b0d1d (diff)
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: 44ee63587dce ("percpu: Add __percpu sparse annotations to hw_breakpoint") Signed-off-by: Chen Jiahao <chenjiahao16@huawei.com> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'samples')
-rw-r--r--samples/hw_breakpoint/data_breakpoint.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/hw_breakpoint/data_breakpoint.c b/samples/hw_breakpoint/data_breakpoint.c
index b99322f188e5..a2c831e89ce0 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);