Re: [RESEND PATCH] MIPS: ftrace: Declare ftrace_get_parent_ra_addr() as static

From: Philippe Mathieu-Daudé
Date: Fri Jan 10 2025 - 03:13:46 EST


On 4/1/25 15:47, WangYuli wrote:
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.

Since 2009 in commit 29c5d3462f7c ("MIPS: Tracing: Add function
graph tracer support for MIPS") eh :)


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@xxxxxxxxxxxxx>
---
arch/mips/kernel/ftrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>