diff options
author | Rasmus Villemoes <[email protected]> | 2021-05-06 18:05:36 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2021-05-07 00:26:33 -0700 |
commit | 07416af11dd85ca61abe60155ace37ced1233617 (patch) | |
tree | 0c8419d33fd5c4435f088bce8f25115ce7c1bff5 /drivers/base/firmware_loader/main.c | |
parent | 9c39c6ffe0c2945c7cf814814c096bc23b63f53d (diff) |
kernel/async.c: stop guarding pr_debug() statements
It's currently nigh impossible to get these pr_debug()s to print
something. Being guarded by initcall_debug means one has to enable tons
of other debug output during boot, and the system_state condition further
means it's impossible to get them when loading modules later.
Also, the compiler can't know that these global conditions do not change,
so there are W=2 warnings
kernel/async.c:125:9: warning: `calltime' may be used uninitialized in this function [-Wmaybe-uninitialized]
kernel/async.c:300:9: warning: `starttime' may be used uninitialized in this function [-Wmaybe-uninitialized]
Make it possible, for a DYNAMIC_DEBUG kernel, to get these to print their
messages by booting with appropriate 'dyndbg="file async.c +p"' command
line argument. For a non-DYNAMIC_DEBUG kernel, pr_debug() compiles to
nothing.
This does cost doing an unconditional ktime_get() for the starttime value,
but the corresponding ktime_get for the end time can be elided by
factoring it into a function which only gets called if the printk()
arguments end up being evaluated.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Rasmus Villemoes <[email protected]>
Cc: Tejun Heo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'drivers/base/firmware_loader/main.c')
0 files changed, 0 insertions, 0 deletions