summaryrefslogtreecommitdiffstats
path: root/samples
diff options
context:
space:
mode:
authorsunliming <sunliming@kylinos.cn>2022-06-06 15:56:59 +0800
committerSteven Rostedt (Google) <rostedt@goodmis.org>2022-07-12 16:36:43 -0400
commite3655dfa58053d614ca9601c36657b469402650f (patch)
tree8de4a559feb7c75b4c607af3c16367044c2cd1cc /samples
parent0bb7e14c8e15ad78b7300e7d89a615ea8b8c89a9 (diff)
downloadlinux-e3655dfa58053d614ca9601c36657b469402650f.tar.gz
linux-e3655dfa58053d614ca9601c36657b469402650f.tar.bz2
linux-e3655dfa58053d614ca9601c36657b469402650f.zip
fprobe/samples: Make sample_probe static
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>
Diffstat (limited to 'samples')
-rw-r--r--samples/fprobe/fprobe_example.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/fprobe/fprobe_example.c b/samples/fprobe/fprobe_example.c
index 01ee6c8c8382..58f6e8358e97 100644
--- a/samples/fprobe/fprobe_example.c
+++ b/samples/fprobe/fprobe_example.c
@@ -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";