From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Tom Rix <trix@redhat.com>
Cc: rostedt@goodmis.org, mark.rutland@arm.com,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH] ftrace: set direct_ops storage-class-specifier to static
Date: Wed, 15 Mar 2023 17:48:45 +0900 [thread overview]
Message-ID: <20230315174845.c4bcf7a75ff5f644bef7b07a@kernel.org> (raw)
In-Reply-To: <20230311135113.711824-1-trix@redhat.com>
On Sat, 11 Mar 2023 08:51:13 -0500
Tom Rix <trix@redhat.com> wrote:
> smatch reports this warning
> kernel/trace/ftrace.c:2594:19: warning:
> symbol 'direct_ops' was not declared. Should it be static?
>
> The variable direct_ops is only used in ftrace.c, so it should be static
>
> Signed-off-by: Tom Rix <trix@redhat.com>
This looks good to me.
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Thank you!
> ---
> kernel/trace/ftrace.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
> index 29baa97d0d53..05f76dc1f0c5 100644
> --- a/kernel/trace/ftrace.c
> +++ b/kernel/trace/ftrace.c
> @@ -2591,7 +2591,7 @@ static void call_direct_funcs(unsigned long ip, unsigned long pip,
> arch_ftrace_set_direct_caller(fregs, addr);
> }
>
> -struct ftrace_ops direct_ops = {
> +static struct ftrace_ops direct_ops = {
> .func = call_direct_funcs,
> .flags = FTRACE_OPS_FL_DIRECT | FTRACE_OPS_FL_SAVE_REGS
> | FTRACE_OPS_FL_PERMANENT,
> --
> 2.27.0
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2023-03-15 8:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-11 13:51 [PATCH] ftrace: set direct_ops storage-class-specifier to static Tom Rix
2023-03-15 8:48 ` Masami Hiramatsu [this message]
2023-03-20 17:44 ` Mark Rutland
2023-03-20 17:51 ` Steven Rostedt
2023-03-21 9:28 ` Mark Rutland
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=20230315174845.c4bcf7a75ff5f644bef7b07a@kernel.org \
--to=mhiramat@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=rostedt@goodmis.org \
--cc=trix@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).