* [PATCH] tracing: Remove unused variable in tracing_trace_options_show()
@ 2025-11-17 17:06 Steven Rostedt
2025-11-17 17:22 ` Andy Shevchenko
0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2025-11-17 17:06 UTC (permalink / raw)
To: LKML, Linux Trace Kernel
Cc: Masami Hiramatsu, Mathieu Desnoyers, Andy Shevchenko
From: Steven Rostedt <rostedt@goodmis.org>
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.
Reported-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>
---
kernel/trace/trace.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 8ae95800592d..59cd4ed8af6d 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -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;
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tracing: Remove unused variable in tracing_trace_options_show()
2025-11-17 17:06 [PATCH] tracing: Remove unused variable in tracing_trace_options_show() Steven Rostedt
@ 2025-11-17 17:22 ` Andy Shevchenko
0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2025-11-17 17:22 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, Linux Trace Kernel, Masami Hiramatsu, Mathieu Desnoyers
On Mon, Nov 17, 2025 at 12:06:37PM -0500, Steven Rostedt wrote:
> 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.
Tested-by: Andy Shevchenko <andriy.shevchenko@intel.com>
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-17 17:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-17 17:06 [PATCH] tracing: Remove unused variable in tracing_trace_options_show() Steven Rostedt
2025-11-17 17:22 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).