dynamic_debug: make dynamic-debug supersede DEBUG ccflag
If CONFIG_DYNAMIC_DEBUG is defined, honor it over DEBUG, so that pr_debug()s are controllable, instead of always-on. When DEBUG is also defined, change _DPRINTK_FLAGS_DEFAULT to enable printing by default. Also adding _DPRINTK_FLAGS_INCL_MODNAME would be nice, but there are numerous cases of pr_debug(NAME ": ...), which would result in double printing of module-name. So defer this until things settle. Cc: David Miller <davem@davemloft.net> Cc: Joe Perches <joe@perches.com> Signed-off-by: Jim Cromie <jim.cromie@gmail.com> Signed-off-by: Jason Baron <jbaron@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
87e6f96833
commit
b558c96ffa
@@ -26,7 +26,11 @@ struct _ddebug {
|
||||
#define _DPRINTK_FLAGS_INCL_FUNCNAME (1<<2)
|
||||
#define _DPRINTK_FLAGS_INCL_LINENO (1<<3)
|
||||
#define _DPRINTK_FLAGS_INCL_TID (1<<4)
|
||||
#if defined DEBUG
|
||||
#define _DPRINTK_FLAGS_DEFAULT _DPRINTK_FLAGS_PRINT
|
||||
#else
|
||||
#define _DPRINTK_FLAGS_DEFAULT 0
|
||||
#endif
|
||||
unsigned int flags:8;
|
||||
} __attribute__((aligned(8)));
|
||||
|
||||
|
Reference in New Issue
Block a user