mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jason Wang <wangborong@cdjrlc.com>
To: rostedt@goodmis.org
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org,
	Jason Wang <wangborong@cdjrlc.com>
Subject: [PATCH] tracing: use WARN_ONCE
Date: Mon, 26 Jul 2021 21:56:35 +0800	[thread overview]
Message-ID: <20210726135635.143285-1-wangborong@cdjrlc.com> (raw)

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


             reply	other threads:[~2021-07-26 13:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-26 13:56 Jason Wang [this message]
2021-07-26 15:02 ` Steven Rostedt
2021-07-26 15:04   ` Steven Rostedt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210726135635.143285-1-wangborong@cdjrlc.com \
    --to=wangborong@cdjrlc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®