Skip to contentSkip to conversation

tracing: Remove unused variable in tracing_trace_options_show()

PATCH In review Steven Rostedt 2 participants 2 messages Nov 17, 2025 Tracing

lore
Share & tools
lore

Steven Rostedt

author maintainer
#0 lore raw

PATCH 1/1 tracing: Remove unused variable in tracing_trace_options_show()

From: Steven Rostedt <[email protected]>

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.

Fixes 428add559b692 ("tracing: Have tracer option be instance specific")
---
 kernel/trace/trace.c | 3 ---
 1 file changed, 3 deletions(-)
kernel/trace/trace.c +0 -3
index 8ae95800592d..59cd4ed8af6d 100644
@@ -5167,7 +5167,6 @@ static int tracing_trace_options_show(struct seq_file *m, void *v)
 	struct tracer_opt *trace_opts;
 	struct trace_array *tr = m->private;
 	struct tracer_flags *flags;
-	struct tracer *trace;
 	u32 tracer_flags;
 	int i;
 
@@ -5184,8 +5183,6 @@ static int tracing_trace_options_show(struct seq_file *m, void *v)
 	if (!flags || !flags->opts)
 		return 0;
 
-	trace = tr->current_trace;
-
 	tracer_flags = flags->val;
 	trace_opts = flags->opts;
 
Signature · 1 line
2.51.0
Tested-by on v1 1/1
#1 lore raw
Quoted 4 lines · Steven Rostedt

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.

Signature · 2 lines
With Best Regards,
Andy Shevchenko