Re: [External] linux-next: build warning after merge of the ftrace tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 5, 2020 at 12:21 PM Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>
> Hi all,
>
> After merging the ftrace tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
>
> kernel/kprobes.c: In function 'kill_kprobe':
> kernel/kprobes.c:1116:33: warning: statement with no effect [-Wunused-value]
>  1116 | #define disarm_kprobe_ftrace(p) (-ENODEV)
>       |                                 ^
> kernel/kprobes.c:2154:3: note: in expansion of macro 'disarm_kprobe_ftrace'
>  2154 |   disarm_kprobe_ftrace(p);
>       |   ^~~~~~~~~~~~~~~~~~~~
>

Sorry, maybe we should rework the macro of disarm_kprobe_ftrace to an
inline function like below.

-#define disarm_kprobe_ftrace(p)        (-ENODEV)
+static inline int disarm_kprobe_ftrace(struct kprobe *p)
+{
+       return -ENODEV
+}
 #endif

> Introduced by commit
>
>   0cb2f1372baa ("kprobes: Fix NULL pointer dereference at kprobe_ftrace_handler")
>
> --
> Cheers,
> Stephen Rothwell



-- 
Yours,
Muchun



[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux