]> git.baikalelectronics.ru Git - kernel.git/commit
dyndbg: avoid calling dyndbg_emit_prefix when it has no work
authorJim Cromie <jim.cromie@gmail.com>
Tue, 4 May 2021 22:22:34 +0000 (16:22 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 May 2021 18:50:23 +0000 (20:50 +0200)
commit083663f51a564d5e6d2ddb697ce9aee8e294897c
tree3b081de7f657cbfb2aeeed57f1333c406f6afe1f
parent9b0c96773917abc0297b273df1c8a5937c1b77d5
dyndbg: avoid calling dyndbg_emit_prefix when it has no work

Wrap function in a static-inline one, which checks flags to avoid
calling the function unnecessarily.

And hoist its output-buffer initialization to the grand-caller, which
is already allocating the buffer on the stack, and can trivially
initialize it too.

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Link: https://lore.kernel.org/r/20210504222235.1033685-2-jim.cromie@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/dynamic_debug.h
lib/dynamic_debug.c