Skip to contentSkip to conversation

ftrace: Make ftrace_profile_pages_init() static

PATCH New Wei Yongjun 1 participant 1 message Jul 13, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ftrace: Make ftrace_profile_pages_init() static

The sparse tool complains as follows:

kernel/trace/ftrace.c:587:5: warning:
symbol 'ftrace_profile_pages_init' was not declared. Should it be static?

ftrace_profile_pages_init() is not used out of ftrace.c, so marks it static.

---
 kernel/trace/ftrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/ftrace.c +1 -1
index a3093a84bae3..3e9369935cb3 100644
@@ -584,7 +584,7 @@ static void ftrace_profile_reset(struct ftrace_profile_stat *stat)
 	       FTRACE_PROFILE_HASH_SIZE * sizeof(struct hlist_head));
 }
 
-int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)
+static int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)
 {
 	struct ftrace_profile_page *pg;
 	int functions;