[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240125201621.143968-5-ricardo@marliere.net>
Date: Thu, 25 Jan 2024 17:16:22 -0300
From: "Ricardo B. Marliere" <ricardo@...liere.net>
To: Steven Rostedt <rostedt@...dmis.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Cc: "Ricardo B. Marliere" <ricardo@...liere.net>,
linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org
Subject: [PATCH v2 3/3] tracing: convert __trace_seq_init to use WARN_ON_ONCE
The initialization of trace_seq buffers are done elsewhere and therefore
__trace_seq_init should yield a warning if it has to actually initialize
the buffer.
Suggested-by: Steven Rostedt <rostedt@...dmis.org>
Signed-off-by: Ricardo B. Marliere <ricardo@...liere.net>
---
kernel/trace/trace_seq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace_seq.c b/kernel/trace/trace_seq.c
index 741b2f3d76c0..3c7a7d903b54 100644
--- a/kernel/trace/trace_seq.c
+++ b/kernel/trace/trace_seq.c
@@ -32,7 +32,7 @@
*/
static inline void __trace_seq_init(struct trace_seq *s)
{
- if (unlikely(!s->seq.size))
+ if (WARN_ON_ONCE(!s->seq.size))
trace_seq_init(s);
}
--
2.43.0
Powered by blists - more mailing lists