Skip to content

Commit

Permalink
init/main.c: don't use pr_debug()
Browse files Browse the repository at this point in the history
Pertially revert commit ea676e8 ("init/main.c: convert to
pr_foo()").

Unbeknownst to me, pr_debug() is different from the other pr_foo()
levels: pr_debug() is a no-op when DEBUG is not defined.

Happily, init/main.c does have a #define DEBUG so we didn't break
initcall_debug.  But the functioning of initcall_debug should not be
dependent upon the presence of that #define DEBUG.

Reported-by: Russell King <rmk@arm.linux.org.uk>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
akpm00 authored and torvalds committed Jun 4, 2014
1 parent 3430343 commit d62cf81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,13 +671,13 @@ static int __init_or_module do_one_initcall_debug(initcall_t fn)
unsigned long long duration;
int ret;

pr_debug("calling %pF @ %i\n", fn, task_pid_nr(current));
printk(KERN_DEBUG "calling %pF @ %i\n", fn, task_pid_nr(current));
calltime = ktime_get();
ret = fn();
rettime = ktime_get();
delta = ktime_sub(rettime, calltime);
duration = (unsigned long long) ktime_to_ns(delta) >> 10;
pr_debug("initcall %pF returned %d after %lld usecs\n",
printk(KERN_DEBUG "initcall %pF returned %d after %lld usecs\n",
fn, ret, duration);

return ret;
Expand Down

0 comments on commit d62cf81

Please sign in to comment.