x86/kprobes: Move 'inline' to the beginning of the kprobe_is_ss() declaration
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 24 Mar 2021 14:45:02 +0000 (14:45 +0000)
committerIngo Molnar <mingo@kernel.org>
Thu, 25 Mar 2021 12:07:58 +0000 (13:07 +0100)
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

index 922a6e2aa74a2fd659c8bcb1f1dc973569ee77f6..dd0902184708476591e9077de78a07490a00b54f 100644 (file)
@@ -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);