diff mbox series

[1/2] MIPS: ftrace: Mark ftrace_get_parent_ra_addr as static

Message ID 20240908-mips-chore-v1-1-9239c783f233@flygoat.com (mailing list archive)
State New
Headers show
Series MIPS: Chore clean ups | expand

Commit Message

Jiaxun Yang Sept. 8, 2024, 10:49 a.m. UTC
This function is only used in ftrace.c.

Mark as static to avoid compiler warning.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
---
 arch/mips/kernel/ftrace.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Maciej W. Rozycki Sept. 9, 2024, 9:59 p.m. UTC | #1
On Sun, 8 Sep 2024, Jiaxun Yang wrote:

> diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c
> index 8c401e42301c..96016eb1c476 100644
> --- a/arch/mips/kernel/ftrace.c
> +++ b/arch/mips/kernel/ftrace.c
> @@ -248,8 +248,8 @@ int ftrace_disable_ftrace_graph_caller(void)
>  #define S_R_SP	(0xafb0 << 16)	/* s{d,w} R, offset(sp) */
>  #define OFFSET_MASK	0xffff	/* stack offset range: 0 ~ PT_SIZE */
>  
> -unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long
> -		old_parent_ra, unsigned long parent_ra_addr, unsigned long fp)
> +static unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long old_parent_ra,
> +					       unsigned long parent_ra_addr, unsigned long fp)

 Overlong lines.

  Maciej
diff mbox series

Patch

diff --git a/arch/mips/kernel/ftrace.c b/arch/mips/kernel/ftrace.c
index 8c401e42301c..96016eb1c476 100644
--- a/arch/mips/kernel/ftrace.c
+++ b/arch/mips/kernel/ftrace.c
@@ -248,8 +248,8 @@  int ftrace_disable_ftrace_graph_caller(void)
 #define S_R_SP	(0xafb0 << 16)	/* s{d,w} R, offset(sp) */
 #define OFFSET_MASK	0xffff	/* stack offset range: 0 ~ PT_SIZE */
 
-unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long
-		old_parent_ra, unsigned long parent_ra_addr, unsigned long fp)
+static unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long old_parent_ra,
+					       unsigned long parent_ra_addr, unsigned long fp)
 {
 	unsigned long sp, ip, tmp;
 	unsigned int code;