From: Masami Hiramatsu <mhiramat@kernel.org>
To: 'Wei Yongjun <weiyongjun1@huawei.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
<x86@kernel.org>, Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
"Steven Rostedt (VMware)" <rostedt@goodmis.org>,
Mike Rapoport <rppt@kernel.org>, Jiri Olsa <jolsa@redhat.com>,
<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
"Hulk Robot" <hulkci@huawei.com>
Subject: Re: [PATCH -next] x86/kprobes: Fix old-style-declaration warning
Date: Thu, 25 Mar 2021 07:49:06 +0900 [thread overview]
Message-ID: <20210325074906.27fb5fd5528da9b3bee72d53@kernel.org> (raw)
In-Reply-To: <20210324144502.1154883-1-weiyongjun1@huawei.com>
On Wed, 24 Mar 2021 14:45:02 +0000
'Wei Yongjun <weiyongjun1@huawei.com> wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Gcc reports build warning as follows:
>
> arch/x86/kernel/kprobes/core.c:940:1:
> warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
> 940 | static int nokprobe_inline kprobe_is_ss(struct kprobe_ctlblk *kcb)
> | ^~~~~~
>
> This commit fix it by moving nokprobe_inline to the beginning
> of declaration.
>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Thank you!
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> arch/x86/kernel/kprobes/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
> index 89d9f26785c7..5abf251f12ec 100644
> --- a/arch/x86/kernel/kprobes/core.c
> +++ b/arch/x86/kernel/kprobes/core.c
> @@ -937,7 +937,7 @@ static int reenter_kprobe(struct kprobe *p, struct pt_regs *regs,
> }
> NOKPROBE_SYMBOL(reenter_kprobe);
>
> -static int nokprobe_inline kprobe_is_ss(struct kprobe_ctlblk *kcb)
> +static nokprobe_inline int kprobe_is_ss(struct kprobe_ctlblk *kcb)
> {
> return (kcb->kprobe_status == KPROBE_HIT_SS ||
> kcb->kprobe_status == KPROBE_REENTER);
>
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2021-03-24 22:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-24 14:45 [PATCH -next] x86/kprobes: Fix old-style-declaration warning 'Wei Yongjun
2021-03-24 22:49 ` Masami Hiramatsu [this message]
2021-03-25 12:12 ` [tip: x86/core] x86/kprobes: Move 'inline' to the beginning of the kprobe_is_ss() declaration tip-bot2 for Wei Yongjun
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=20210325074906.27fb5fd5528da9b3bee72d53@kernel.org \
--to=mhiramat@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=hulkci@huawei.com \
--cc=jolsa@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=rppt@kernel.org \
--cc=tglx@linutronix.de \
--cc=weiyongjun1@huawei.com \
--cc=x86@kernel.org \
/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