From: Chen Jiahao Date: Wed, 26 Jul 2023 10:17:59 +0000 (+0000) Subject: samples/hw_breakpoint: mark sample_hbp as static X-Git-Tag: v6.6.17~4090^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4b49df654cd0d1c3c359fc0f52182943a650b746;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Luis Chamberlain --- diff --git a/samples/hw_breakpoint/data_breakpoint.c b/samples/hw_breakpoint/data_breakpoint.c index b99322f..a2c831e 100644 --- a/samples/hw_breakpoint/data_breakpoint.c +++ b/samples/hw_breakpoint/data_breakpoint.c @@ -21,7 +21,7 @@ #include #include -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);