From: Steven Rostedt (Google) Date: Thu, 6 Apr 2023 15:10:33 +0000 (-0400) Subject: tracing/synthetic: Make lastcmd_mutex static X-Git-Tag: v6.1.37~2317 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc48648699c77571de09f490051ca0fbafeb7c9d;p=platform%2Fkernel%2Flinux-starfive.git tracing/synthetic: Make lastcmd_mutex static commit 31c683967174b487939efaf65e41f5ff1404e141 upstream. The lastcmd_mutex is only used in trace_events_synth.c and should be static. Link: https://lore.kernel.org/linux-trace-kernel/202304062033.cRStgOuP-lkp@intel.com/ Link: https://lore.kernel.org/linux-trace-kernel/20230406111033.6e26de93@gandalf.local.home Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Tze-nan Wu Fixes: 4ccf11c4e8a8e ("tracing/synthetic: Fix races on freeing last_cmd") Reviewed-by: Mukesh Ojha Reported-by: kernel test robot Signed-off-by: Steven Rostedt (Google) Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/trace/trace_events_synth.c b/kernel/trace/trace_events_synth.c index ea94893..89083ae 100644 --- a/kernel/trace/trace_events_synth.c +++ b/kernel/trace/trace_events_synth.c @@ -44,7 +44,7 @@ enum { ERRORS }; static const char *err_text[] = { ERRORS }; -DEFINE_MUTEX(lastcmd_mutex); +static DEFINE_MUTEX(lastcmd_mutex); static char *last_cmd; static int errpos(const char *str)