powerpc/ftrace: Add prototype for prepare_ftrace_return()
authorTobin C. Harding <me@tobin.cc>
Mon, 6 Mar 2017 08:49:46 +0000 (19:49 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 20 Mar 2017 08:02:49 +0000 (19:02 +1100)
Sparse emits a warning: symbol 'prepare_ftrace_return' was not
declared. Should it be static? prepare_ftrace_return() is called from
assembler and should not be static.

Add a prototype for it to asm-prototypes.h and include that in ftrace.c.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/asm-prototypes.h
arch/powerpc/kernel/ftrace.c

index f6c5264287e533bbfbc064eb14346bbb146d67c1..e02db66a77e3a64eb1fcf921accfc5e0ad7c468e 100644 (file)
@@ -120,6 +120,8 @@ extern s64 __ashrdi3(s64, int);
 extern int __cmpdi2(s64, s64);
 extern int __ucmpdi2(u64, u64);
 
+/* tracing */
 void _mcount(void);
+unsigned long prepare_ftrace_return(unsigned long parent, unsigned long ip);
 
 #endif /* _ASM_POWERPC_ASM_PROTOTYPES_H */
index 5c9f50c1aa992867c57cad33983ccac0460ef2f6..32509de6ce4cef280b4b270c270a027d5dda6500 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/init.h>
 #include <linux/list.h>
 
+#include <asm/asm-prototypes.h>
 #include <asm/cacheflush.h>
 #include <asm/code-patching.h>
 #include <asm/ftrace.h>