mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] init: Do not warn on non-zero initcall return
@ 2013-05-01 17:35 Steven Rostedt
  2013-05-02  7:43 ` Geert Uytterhoeven
  0 siblings, 1 reply; 5+ messages in thread
From: Steven Rostedt @ 2013-05-01 17:35 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: LKML, Andrew Morton, Konrad Rzeszutek Wilk

Commit f91eb62f71 "init: scream bloody murder if interrupts are enabled
too early" added three new warnings. The first two seemed reasonable,
but the third included a warning when an initcall returned non-zero.
Although, the third WARN() does include an imbalanced preempt disabled,
or irqs disable, it shouldn't warn if it only had an initcall that just
returns non-zero.

In fact, according to Linus, it shouldn't print at all. As it only
prints with initcall_debug set, and that already shows enough
information to fix things.

Link: http://lkml.kernel.org/r/CA+55aFzaBC5SFi7=F2mfm+KWY5qTsBmOqgbbs8E+LUS8JK-sBg@mail.gmail.com

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

diff --git a/init/main.c b/init/main.c
index bea1287..ceed17a 100644
--- a/init/main.c
+++ b/init/main.c
@@ -686,11 +686,8 @@ int __init_or_module do_one_initcall(initcall_t fn)
 
 	msgbuf[0] = 0;
 
-	if (ret && ret != -ENODEV && initcall_debug)
-		sprintf(msgbuf, "error code %d ", ret);
-
 	if (preempt_count() != count) {
-		strlcat(msgbuf, "preemption imbalance ", sizeof(msgbuf));
+		sprintf(msgbuf, "preemption imbalance ");
 		preempt_count() = count;
 	}
 	if (irqs_disabled()) {



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

end of thread, other threads:[~2013-05-02 18:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-01 17:35 [PATCH v2] init: Do not warn on non-zero initcall return Steven Rostedt
2013-05-02  7:43 ` Geert Uytterhoeven
2013-05-02 15:17   ` Steven Rostedt
2013-05-02 18:33     ` Geert Uytterhoeven
2013-05-02 18:45       ` 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®