Skip to content

Commit 4e84dc4

Browse files
committed
ftrace/nds32: Update the proto for ftrace_trace_function to match ftrace_stub
The ftrace callback prototype was changed to pass a special ftrace_regs instead of pt_regs as the last parameter, but the static ftrace for nds32 missed updating ftrace_trace_function and this caused a warning when compared to ftrace_stub: ../arch/nds32/kernel/ftrace.c: In function '_mcount': ../arch/nds32/kernel/ftrace.c:24:35: error: comparison of distinct pointer types lacks a cast [-Werror] 24 | if (ftrace_trace_function != ftrace_stub) | ^~ Link: https://lore.kernel.org/all/[email protected]/ Link: https://lkml.kernel.org/r/[email protected] Cc: Ingo Molnar <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Nick Hu <[email protected]> Cc: Greentime Hu <[email protected]> Cc: Vincent Chen <[email protected]> Cc: Masami Hiramatsu <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Fixes: d19ad07 ("ftrace: Have the callbacks receive a struct ftrace_regs instead of pt_regs") Reported-by: Randy Dunlap <[email protected]> Signed-off-by: Steven Rostedt (VMware) <[email protected]>
1 parent ed65df6 commit 4e84dc4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/nds32/kernel/ftrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#ifndef CONFIG_DYNAMIC_FTRACE
88
extern void (*ftrace_trace_function)(unsigned long, unsigned long,
9-
struct ftrace_ops*, struct pt_regs*);
9+
struct ftrace_ops*, struct ftrace_regs*);
1010
extern void ftrace_graph_caller(void);
1111

1212
noinline void __naked ftrace_stub(unsigned long ip, unsigned long parent_ip,

0 commit comments

Comments
 (0)