* [PATCH] fprobe/samples: make sample_probe static
@ 2022-06-06 7:56 sunliming
2022-06-06 14:43 ` Masami Hiramatsu
0 siblings, 1 reply; 3+ messages in thread
From: sunliming @ 2022-06-06 7:56 UTC (permalink / raw)
To: rostedt, ast, mhiramat, jolsa
Cc: sunliming, linux-kernel, kelulanainsley, kernel test robot
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@intel.com>
Signed-off-by: sunliming <sunliming@kylinos.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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] fprobe/samples: make sample_probe static
2022-06-06 7:56 [PATCH] fprobe/samples: make sample_probe static sunliming
@ 2022-06-06 14:43 ` Masami Hiramatsu
2022-07-12 1:00 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Masami Hiramatsu @ 2022-06-06 14:43 UTC (permalink / raw)
To: sunliming
Cc: rostedt, ast, jolsa, linux-kernel, kelulanainsley,
kernel test robot
On Mon, 6 Jun 2022 15:56:59 +0800
sunliming <sunliming@kylinos.cn> wrote:
> 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?
>
Looks good to me. Thanks for the fix!
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: sunliming <sunliming@kylinos.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
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fprobe/samples: make sample_probe static
2022-06-06 14:43 ` Masami Hiramatsu
@ 2022-07-12 1:00 ` Steven Rostedt
0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2022-07-12 1:00 UTC (permalink / raw)
To: Masami Hiramatsu (Google)
Cc: sunliming, ast, jolsa, linux-kernel, kelulanainsley,
kernel test robot
On Mon, 6 Jun 2022 23:43:10 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> Looks good to me. Thanks for the fix!
>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Applied, thanks sunliming and Masami!
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-07-12 1:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-06 7:56 [PATCH] fprobe/samples: make sample_probe static sunliming
2022-06-06 14:43 ` Masami Hiramatsu
2022-07-12 1:00 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox