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

From
Masami Hiramatsu <mhiramat@kernel.org>
Date
2020-08-05 17:11:03
Also in
lkml
Reply to
Steven Rostedt, 2020-08-05
On Wed, 5 Aug 2020 11:11:05 -0400
Steven Rostedt [off-list ref] wrote:
On Wed, 5 Aug 2020 12:53:39 +0800
Muchun Song [off-list ref] wrote:
quoted
On Wed, Aug 5, 2020 at 12:21 PM Stephen Rothwell [off-list ref] wrote:
quoted
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
Looks like that would work. Care to send a formal patch. Could you also
change arm_kprobe_ftrace() as well?
Looks good to me too as far as updating it to static inline function.

Thank you,

-- 
Masami Hiramatsu [off-list ref]
Thread (6 messages) 6 messages, 4 authors, last reply 2020-08-05
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help