Skip to contentSkip to conversation

ftrace/nds32: Update the proto for ftrace_trace_function to match ftrace_stub

PATCH New Steven Rostedt 1 participant 1 message Oct 27, 2021 ftrace

lore
Share & tools
lore

Steven Rostedt

author maintainer
#0 lore raw

PATCH 1/1 ftrace/nds32: Update the proto for ftrace_trace_function to match ftrace_stub

From: "Steven Rostedt (VMware)" <[email protected]>

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)
| ^~

Fixes d19ad0775dcd6 ("ftrace: Have the callbacks receive a struct ftrace_regs instead of pt_regs")
---
 arch/nds32/kernel/ftrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/nds32/kernel/ftrace.c +1 -1
index f0ef4842d191..711bc8cd186d 100644
@@ -6,7 +6,7 @@
 
 #ifndef CONFIG_DYNAMIC_FTRACE
 extern void (*ftrace_trace_function)(unsigned long, unsigned long,
-				     struct ftrace_ops*, struct pt_regs*);
+				     struct ftrace_ops*, struct ftrace_regs*);
 extern void ftrace_graph_caller(void);
 
 noinline void __naked ftrace_stub(unsigned long ip, unsigned long parent_ip,
Signature · 1 line
2.31.1