mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] tracing: use WARN_ONCE
@ 2021-07-26 13:56 Jason Wang
  2021-07-26 15:02 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Jason Wang @ 2021-07-26 13:56 UTC (permalink / raw)
  To: rostedt; +Cc: mingo, linux-kernel, Jason Wang

printk + WARN_ON_ONCE can be just WARN_ONCE.

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
---
 kernel/trace/trace_output.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c
index a0bf446bb034..c06726b6d8b4 100644
--- a/kernel/trace/trace_output.c
+++ b/kernel/trace/trace_output.c
@@ -1574,9 +1574,8 @@ __init static int init_events(void)
 
 		ret = register_trace_event(event);
 		if (!ret) {
-			printk(KERN_WARNING "event %d failed to register\n",
-			       event->type);
-			WARN_ON_ONCE(1);
+			WARN_ONCE(1, "event %d failed to register\n",
+				  event->type);
 		}
 	}
 
-- 
2.32.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-26 15:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-26 13:56 [PATCH] tracing: use WARN_ONCE Jason Wang
2021-07-26 15:02 ` Steven Rostedt
2021-07-26 15:04   ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®