summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRasmus Villemoes <linux@rasmusvillemoes.dk>2021-05-06 18:05:36 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2021-05-07 00:26:33 -0700
commit07416af11dd85ca61abe60155ace37ced1233617 (patch)
tree0c8419d33fd5c4435f088bce8f25115ce7c1bff5 /tools
parent9c39c6ffe0c2945c7cf814814c096bc23b63f53d (diff)
downloadlinux-stable-07416af11dd85ca61abe60155ace37ced1233617.tar.gz
linux-stable-07416af11dd85ca61abe60155ace37ced1233617.tar.bz2
linux-stable-07416af11dd85ca61abe60155ace37ced1233617.zip
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/20210309151723.1907838-1-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions