Commit bf5d770b authored by Steven Rostedt's avatar Steven Rostedt Committed by Linus Torvalds

init: Do not warn on non-zero initcall return

Commit f91eb62f ("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.comSuggested-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Reported-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a49fe6d5
......@@ -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()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment