Skip to content

Commit 26c3379

Browse files
arndbhansendc
authored andcommitted
x86/ftrace: Move prepare_ftrace_return prototype to header
On 32-bit builds, the prepare_ftrace_return() function only has a global definition, but no prototype before it, which causes a warning: arch/x86/kernel/ftrace.c:625:6: warning: no previous prototype for ‘prepare_ftrace_return’ [-Wmissing-prototypes] 625 | void prepare_ftrace_return(unsigned long ip, unsigned long *parent, Move the prototype that is already needed for some configurations into a header file where it can be seen unconditionally. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com> Link: https://lore.kernel.org/all/20230516193549.544673-2-arnd%40kernel.org
1 parent e31a5c5 commit 26c3379

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

arch/x86/include/asm/ftrace.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ struct dyn_arch_ftrace {
106106

107107
#ifndef __ASSEMBLY__
108108

109+
void prepare_ftrace_return(unsigned long ip, unsigned long *parent,
110+
unsigned long frame_pointer);
111+
109112
#if defined(CONFIG_FUNCTION_TRACER) && defined(CONFIG_DYNAMIC_FTRACE)
110113
extern void set_ftrace_ops_ro(void);
111114
#else

arch/x86/kernel/ftrace.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,9 +525,6 @@ static void *addr_from_call(void *ptr)
525525
return ptr + CALL_INSN_SIZE + call.disp;
526526
}
527527

528-
void prepare_ftrace_return(unsigned long ip, unsigned long *parent,
529-
unsigned long frame_pointer);
530-
531528
/*
532529
* If the ops->trampoline was not allocated, then it probably
533530
* has a static trampoline func, or is the ftrace caller itself.

0 commit comments

Comments
 (0)