From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: sunliming <sunliming@kylinos.cn>
Cc: rostedt@goodmis.org, ast@kernel.org, jolsa@kernel.org,
linux-kernel@vger.kernel.org, kelulanainsley@gmail.com,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] fprobe/samples: make sample_probe static
Date: Mon, 6 Jun 2022 23:43:10 +0900 [thread overview]
Message-ID: <20220606234310.b0f893ee35c0106e414bd67f@kernel.org> (raw)
In-Reply-To: <20220606075659.674556-1-sunliming@kylinos.cn>
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>
next prev parent reply other threads:[~2022-06-06 14:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-06 7:56 [PATCH] fprobe/samples: make sample_probe static sunliming
2022-06-06 14:43 ` Masami Hiramatsu [this message]
2022-07-12 1:00 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220606234310.b0f893ee35c0106e414bd67f@kernel.org \
--to=mhiramat@kernel.org \
--cc=ast@kernel.org \
--cc=jolsa@kernel.org \
--cc=kelulanainsley@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=rostedt@goodmis.org \
--cc=sunliming@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox