* [PATCH -next] x86/kprobes: Fix old-style-declaration warning
@ 2021-03-24 14:45 'Wei Yongjun
2021-03-24 22:49 ` Masami Hiramatsu
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
0 siblings, 2 replies; 3+ messages in thread
From: 'Wei Yongjun @ 2021-03-24 14:45 UTC (permalink / raw)
To: weiyongjun1, Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
Masami Hiramatsu, Peter Zijlstra, Andrew Morton,
Steven Rostedt (VMware),
Mike Rapoport, Jiri Olsa
Cc: linux-kernel, kernel-janitors, Hulk Robot
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.
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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next] x86/kprobes: Fix old-style-declaration warning
2021-03-24 14:45 [PATCH -next] x86/kprobes: Fix old-style-declaration warning 'Wei Yongjun
@ 2021-03-24 22:49 ` Masami Hiramatsu
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
1 sibling, 0 replies; 3+ messages in thread
From: Masami Hiramatsu @ 2021-03-24 22:49 UTC (permalink / raw)
To: 'Wei Yongjun
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, x86,
Peter Zijlstra, Andrew Morton, Steven Rostedt (VMware),
Mike Rapoport, Jiri Olsa, linux-kernel, kernel-janitors,
Hulk Robot
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip: x86/core] x86/kprobes: Move 'inline' to the beginning of the kprobe_is_ss() declaration
2021-03-24 14:45 [PATCH -next] x86/kprobes: Fix old-style-declaration warning 'Wei Yongjun
2021-03-24 22:49 ` Masami Hiramatsu
@ 2021-03-25 12:12 ` tip-bot2 for Wei Yongjun
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Wei Yongjun @ 2021-03-25 12:12 UTC (permalink / raw)
To: linux-tip-commits
Cc: Hulk Robot, Wei Yongjun, Ingo Molnar, Masami Hiramatsu, x86,
linux-kernel
The following commit has been merged into the x86/core branch of tip:
Commit-ID: 2304d14db6595bea5292bece06c4c625b12d8f89
Gitweb: https://git.kernel.org/tip/2304d14db6595bea5292bece06c4c625b12d8f89
Author: Wei Yongjun <weiyongjun1@huawei.com>
AuthorDate: Wed, 24 Mar 2021 14:45:02
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Thu, 25 Mar 2021 13:07:58 +01:00
x86/kprobes: Move 'inline' to the beginning of the kprobe_is_ss() declaration
Address this GCC warning:
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)
| ^~~~~~
[ mingo: Tidied up the changelog. ]
Fixes: 6256e668b7af: ("x86/kprobes: Use int3 instead of debug trap for single-step")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20210324144502.1154883-1-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 922a6e2..dd09021 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -940,7 +940,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);
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-25 12:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 14:45 [PATCH -next] x86/kprobes: Fix old-style-declaration warning 'Wei Yongjun
2021-03-24 22:49 ` Masami Hiramatsu
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
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).