From: Steven Rostedt (Google) Date: Wed, 5 Jun 2024 20:26:49 +0000 (-0400) Subject: function_graph: Make fgraph_do_direct static key static X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=0c4d8cbb2ce20df3a72b5b3189d93b5c0cc3e968;p=users%2Fdwmw2%2Flinux.git function_graph: Make fgraph_do_direct static key static The static branch key "fgraph_do_direct" was not declared static but is only used in one file. Change it to a static variable. Link: https://lore.kernel.org/linux-trace-kernel/20240605202708.936515302@goodmis.org Cc: Mark Rutland Cc: Mathieu Desnoyers Cc: Andrew Morton Fixes: cc60ee813b503 ("function_graph: Use static_call and branch to optimize entry function") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202406051711.dS1sQZ9n-lkp@intel.com/ Acked-by: Masami Hiramatsu (Google) Signed-off-by: Steven Rostedt (Google) --- diff --git a/kernel/trace/fgraph.c b/kernel/trace/fgraph.c index 4bf91eebbb083..63d828054c79a 100644 --- a/kernel/trace/fgraph.c +++ b/kernel/trace/fgraph.c @@ -515,7 +515,7 @@ static struct fgraph_ops fgraph_stub = { static struct fgraph_ops *fgraph_direct_gops = &fgraph_stub; DEFINE_STATIC_CALL(fgraph_func, ftrace_graph_entry_stub); DEFINE_STATIC_CALL(fgraph_retfunc, ftrace_graph_ret_stub); -DEFINE_STATIC_KEY_TRUE(fgraph_do_direct); +static DEFINE_STATIC_KEY_TRUE(fgraph_do_direct); /** * ftrace_graph_stop - set to permanently disable function graph tracing