Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tracing: Remove unused variable in tracing_trace_options_show()

The flags and opts used in tracing_trace_options_show() now come directly
from the trace array "current_trace_flags" and not the current_trace. The
variable "trace" was still being assigned to tr->current_trace but never
used. This caused a warning in clang.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://patch.msgid.link/20251117120637.43ef995d@gandalf.local.home
Reported-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Tested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Closes: https://lore.kernel.org/all/aRtHWXzYa8ijUIDa@black.igk.intel.com/
Fixes: 428add559b692 ("tracing: Have tracer option be instance specific")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

-3
-3
kernel/trace/trace.c
··· 5167 5167 struct tracer_opt *trace_opts; 5168 5168 struct trace_array *tr = m->private; 5169 5169 struct tracer_flags *flags; 5170 - struct tracer *trace; 5171 5170 u32 tracer_flags; 5172 5171 int i; 5173 5172 ··· 5182 5183 flags = tr->current_trace_flags; 5183 5184 if (!flags || !flags->opts) 5184 5185 return 0; 5185 - 5186 - trace = tr->current_trace; 5187 5186 5188 5187 tracer_flags = flags->val; 5189 5188 trace_opts = flags->opts;