]> git.baikalelectronics.ru Git - kernel.git/commitdiff
fprobe/samples: Make sample_probe static
authorsunliming <sunliming@kylinos.cn>
Mon, 6 Jun 2022 07:56:59 +0000 (15:56 +0800)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 12 Jul 2022 20:36:43 +0000 (16:36 -0400)
This symbol is not used outside of fprobe_example.c, so marks it static.

Fixes the following warning:

sparse warnings: (new ones prefixed by >>)
>> samples/fprobe/fprobe_example.c:23:15: sparse: sparse: symbol 'sample_probe'
was not declared. Should it be static?

Link: https://lkml.kernel.org/r/20220606075659.674556-1-sunliming@kylinos.cn
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: sunliming <sunliming@kylinos.cn>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
samples/fprobe/fprobe_example.c

index 01ee6c8c8382921d253e0a130b8a05df3c60ebc1..58f6e8358e974d8ed57daee2d0ed12b9fff02c5a 100644 (file)
@@ -20,7 +20,7 @@
 
 #define BACKTRACE_DEPTH 16
 #define MAX_SYMBOL_LEN 4096
-struct fprobe sample_probe;
+static struct fprobe sample_probe;
 static unsigned long nhit;
 
 static char symbol[MAX_SYMBOL_LEN] = "kernel_clone";