aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/dynamic_debug.h
diff options
context:
space:
mode:
authorJim Cromie <jim.cromie@gmail.com>2011-12-19 17:11:18 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-24 15:46:44 -0500
commitb558c96ffa53f4b3dd52b774e4fb7a52982ab52b (patch)
treec178b95b2f1bb9e146d4f33f287ab37c2dab119a /include/linux/dynamic_debug.h
parent87e6f968339bcdda56b39572c7e63331192296a0 (diff)
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>
Diffstat (limited to 'include/linux/dynamic_debug.h')
-rw-r--r--include/linux/dynamic_debug.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h
index f71a6b046245..29ea09ae30cf 100644
--- a/include/linux/dynamic_debug.h
+++ b/include/linux/dynamic_debug.h
@@ -26,7 +26,11 @@ struct _ddebug {
26#define _DPRINTK_FLAGS_INCL_FUNCNAME (1<<2) 26#define _DPRINTK_FLAGS_INCL_FUNCNAME (1<<2)
27#define _DPRINTK_FLAGS_INCL_LINENO (1<<3) 27#define _DPRINTK_FLAGS_INCL_LINENO (1<<3)
28#define _DPRINTK_FLAGS_INCL_TID (1<<4) 28#define _DPRINTK_FLAGS_INCL_TID (1<<4)
29#if defined DEBUG
30#define _DPRINTK_FLAGS_DEFAULT _DPRINTK_FLAGS_PRINT
31#else
29#define _DPRINTK_FLAGS_DEFAULT 0 32#define _DPRINTK_FLAGS_DEFAULT 0
33#endif
30 unsigned int flags:8; 34 unsigned int flags:8;
31} __attribute__((aligned(8))); 35} __attribute__((aligned(8)));
32 36