Skip to content

Commit ddd068d

Browse files
Avenger-285714tsbogend
authored andcommitted
MIPS: ftrace: Declare ftrace_get_parent_ra_addr() as static
Declare ftrace_get_parent_ra_addr() as static to suppress clang compiler warning that 'no previous prototype'. This function is not intended to be called from other parts. Fix follow error with clang-19: arch/mips/kernel/ftrace.c:251:15: error: no previous prototype for function 'ftrace_get_parent_ra_addr' [-Werror,-Wmissing-prototypes] 251 | unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long | ^ arch/mips/kernel/ftrace.c:251:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 251 | unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long | ^ | static 1 error generated. Signed-off-by: WangYuli <wangyuli@uniontech.com> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent 078b831 commit ddd068d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/mips/kernel/ftrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ int ftrace_disable_ftrace_graph_caller(void)
248248
#define S_R_SP (0xafb0 << 16) /* s{d,w} R, offset(sp) */
249249
#define OFFSET_MASK 0xffff /* stack offset range: 0 ~ PT_SIZE */
250250

251-
unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long
251+
static unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long
252252
old_parent_ra, unsigned long parent_ra_addr, unsigned long fp)
253253
{
254254
unsigned long sp, ip, tmp;

0 commit comments

Comments
 (0)