diff options
author | Chen Jiahao <chenjiahao16@huawei.com> | 2023-07-26 10:17:59 +0000 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2023-07-26 11:17:19 -0700 |
commit | 4b49df654cd0d1c3c359fc0f52182943a650b746 (patch) | |
tree | 6fec7c9445d26332a7e5b6322c9e32f306520f5f /samples | |
parent | b9080468caeddc58a91edd1c3a7d212ea82b0d1d (diff) | |
download | linux-stable-4b49df654cd0d1c3c359fc0f52182943a650b746.tar.gz linux-stable-4b49df654cd0d1c3c359fc0f52182943a650b746.tar.bz2 linux-stable-4b49df654cd0d1c3c359fc0f52182943a650b746.zip |
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.c | 2 |
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); |