From: Steven Rostedt (Google) Date: Wed, 5 Jun 2024 20:26:45 +0000 (-0400) Subject: ftrace: Declare function_trace_op in header to quiet sparse warning X-Git-Tag: v6.11-rc1~133^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d5f0222944fe723b9bfaaeb27e368363644ccab;p=thirdparty%2Flinux.git ftrace: Declare function_trace_op in header to quiet sparse warning Sparse complains that function_trace_op is not static but is not declared in a header file. It is used only in assembly code. But add it to a header so that sparse no longer complains: kernel/trace/ftrace.c:99:19: warning: symbol 'function_trace_op' was not declared. Should it be static? Link: https://lore.kernel.org/linux-trace-kernel/20240605202708.289105647@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) --- diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 9f61556a94910..4135dc171447a 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -1131,6 +1131,9 @@ extern void ftrace_graph_init_task(struct task_struct *t); extern void ftrace_graph_exit_task(struct task_struct *t); extern void ftrace_graph_init_idle_task(struct task_struct *t, int cpu); +/* Used by assembly, but to quiet sparse warnings */ +extern struct ftrace_ops *function_trace_op; + static inline void pause_graph_tracing(void) { atomic_inc(¤t->tracing_graph_pause);