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-...@mail.gmail.com

Suggested-by: Linus Torvalds <[email protected]>
Reported-by: Konrad Rzeszutek Wilk <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>

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()) {


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to