Skip to content

Commit 1d6571a

Browse files
committed
arch: add missing prepare_ftrace_return() prototypes
The prototype for prepare_ftrace_return() is architecture specific and can't be in a global header. Since it's normally called from assembly, it doesn't really need a prototype, but we get a warning if it's missing: arch/csky/kernel/ftrace.c:147:6: error: no previous prototype for 'prepare_ftrace_return' [-Werror=missing-prototypes] arch/microblaze/kernel/ftrace.c:22:6: error: no previous prototype for 'prepare_ftrace_return' [-Werror=missing-prototypes] arch/mips/kernel/ftrace.c:305:6: error: no previous prototype for 'prepare_ftrace_return' [-Werror=missing-prototypes] Add the prototypes for the three architectures that don't already have one in asm/ftrace.h. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent 42874e4 commit 1d6571a

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

arch/csky/include/asm/ftrace.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,9 @@ static inline unsigned long ftrace_call_adjust(unsigned long addr)
2626

2727
struct dyn_arch_ftrace {
2828
};
29+
30+
void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr,
31+
unsigned long frame_pointer);
32+
2933
#endif /* !__ASSEMBLY__ */
3034
#endif /* __ASM_CSKY_FTRACE_H */

arch/microblaze/include/asm/ftrace.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#ifndef __ASSEMBLY__
1111
extern void _mcount(void);
1212
extern void ftrace_call_graph(void);
13+
void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr);
1314
#endif
1415

1516
#ifdef CONFIG_DYNAMIC_FTRACE

arch/mips/include/asm/ftrace.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ struct dyn_arch_ftrace {
8585
};
8686

8787
#endif /* CONFIG_DYNAMIC_FTRACE */
88+
89+
void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,
90+
unsigned long fp);
91+
8892
#endif /* __ASSEMBLY__ */
8993
#endif /* CONFIG_FUNCTION_TRACER */
9094
#endif /* _ASM_MIPS_FTRACE_H */

0 commit comments

Comments
 (0)