Skip to content

Commit bf5d770

Browse files
rostedttorvalds
authored andcommitted
init: Do not warn on non-zero initcall return
Commit f91eb62 ("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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent a49fe6d commit bf5d770

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎init/main.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -686,11 +686,8 @@ int __init_or_module do_one_initcall(initcall_t fn)
686686

687687
msgbuf[0] = 0;
688688

689-
if (ret && ret != -ENODEV && initcall_debug)
690-
sprintf(msgbuf, "error code %d ", ret);
691-
692689
if (preempt_count() != count) {
693-
strlcat(msgbuf, "preemption imbalance ", sizeof(msgbuf));
690+
sprintf(msgbuf, "preemption imbalance ");
694691
preempt_count() = count;
695692
}
696693
if (irqs_disabled()) {

0 commit comments

Comments
 (0)