mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ced081a436
commit
640d1eaff2
@@ -32,6 +32,11 @@ struct _ddebug {
|
||||
#define _DPRINTK_FLAGS_INCL_FUNCNAME (1<<2)
|
||||
#define _DPRINTK_FLAGS_INCL_LINENO (1<<3)
|
||||
#define _DPRINTK_FLAGS_INCL_TID (1<<4)
|
||||
|
||||
#define _DPRINTK_FLAGS_INCL_ANY \
|
||||
(_DPRINTK_FLAGS_INCL_MODNAME | _DPRINTK_FLAGS_INCL_FUNCNAME |\
|
||||
_DPRINTK_FLAGS_INCL_LINENO | _DPRINTK_FLAGS_INCL_TID)
|
||||
|
||||
#if defined DEBUG
|
||||
#define _DPRINTK_FLAGS_DEFAULT _DPRINTK_FLAGS_PRINT
|
||||
#else
|
||||
|
Reference in New Issue
Block a user