aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include
diff options
context:
space:
mode:
authorJim Cromie <jim.cromie@gmail.com>2021-05-04 16:22:34 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-13 20:50:23 +0200
commit640d1eaff2c09e382a23bd831094ebbfaa16fef5 (patch)
tree3b081de7f657cbfb2aeeed57f1333c406f6afe1f /include
parentbinder: Return EFAULT if we fail BINDER_ENABLE_ONEWAY_SPAM_DETECTION (diff)
downloadwireguard-linux-640d1eaff2c09e382a23bd831094ebbfaa16fef5.tar.xz
wireguard-linux-640d1eaff2c09e382a23bd831094ebbfaa16fef5.zip
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dynamic_debug.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index a57ee75342cf..dce631e678dd 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -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