[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 6 Jun 2022 15:56:59 +0800
From: sunliming <sunliming@...inos.cn>
To: rostedt@...dmis.org, ast@...nel.org, mhiramat@...nel.org,
jolsa@...nel.org
Cc: sunliming@...inos.cn, linux-kernel@...r.kernel.org,
kelulanainsley@...il.com, kernel test robot <lkp@...el.com>
Subject: [PATCH] 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?
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: sunliming <sunliming@...inos.cn>
---
samples/fprobe/fprobe_example.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/fprobe/fprobe_example.c b/samples/fprobe/fprobe_example.c
index 24d3cf109140..123cfd83d4c6 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 char symbol[MAX_SYMBOL_LEN] = "kernel_clone";
module_param_string(symbol, symbol, sizeof(symbol), 0644);
--
2.25.1
Powered by blists - more mailing lists