diff options
author | Luis de Bethencourt <luisbg@osg.samsung.com> | 2016-08-02 17:03:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-02 19:35:03 -0400 |
commit | 9d5059c959ac739dbf837cec14586e58e7a67292 (patch) | |
tree | a0d513d3c1a8f5acadfa7e3c2085fd6daaaa321c | |
parent | 61e96496d3c949701a48b908f99f4ed891cd1101 (diff) |
dynamic_debug: only add header when used
kernel.h header doesn't directly use dynamic debug, instead we can
include it in module.c (which used it via kernel.h). printk.h only uses
it if CONFIG_DYNAMIC_DEBUG is on, changing the inclusion to only happen
in that case.
Link: http://lkml.kernel.org/r/1468429793-16917-1-git-send-email-luisbg@osg.samsung.com
[luisbg@osg.samsung.com: include dynamic_debug.h in drb_int.h]
Link: http://lkml.kernel.org/r/1468447828-18558-2-git-send-email-luisbg@osg.samsung.com
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/block/drbd/drbd_actlog.c | 1 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 1 | ||||
-rw-r--r-- | include/linux/kernel.h | 1 | ||||
-rw-r--r-- | include/linux/printk.h | 3 | ||||
-rw-r--r-- | kernel/module.c | 1 |
5 files changed, 4 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c index 0a1aaf8c24c4..2d3d50ab74bf 100644 --- a/drivers/block/drbd/drbd_actlog.c +++ b/drivers/block/drbd/drbd_actlog.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/crc32c.h> | 27 | #include <linux/crc32c.h> |
28 | #include <linux/drbd.h> | 28 | #include <linux/drbd.h> |
29 | #include <linux/drbd_limits.h> | 29 | #include <linux/drbd_limits.h> |
30 | #include <linux/dynamic_debug.h> | ||
31 | #include "drbd_int.h" | 30 | #include "drbd_int.h" |
32 | 31 | ||
33 | 32 | ||
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 7b54354976a5..4cb8f21ff4ef 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/backing-dev.h> | 41 | #include <linux/backing-dev.h> |
42 | #include <linux/genhd.h> | 42 | #include <linux/genhd.h> |
43 | #include <linux/idr.h> | 43 | #include <linux/idr.h> |
44 | #include <linux/dynamic_debug.h> | ||
44 | #include <net/tcp.h> | 45 | #include <net/tcp.h> |
45 | #include <linux/lru_cache.h> | 46 | #include <linux/lru_cache.h> |
46 | #include <linux/prefetch.h> | 47 | #include <linux/prefetch.h> |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index c42082112ec8..d96a6118d26a 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/log2.h> | 11 | #include <linux/log2.h> |
12 | #include <linux/typecheck.h> | 12 | #include <linux/typecheck.h> |
13 | #include <linux/printk.h> | 13 | #include <linux/printk.h> |
14 | #include <linux/dynamic_debug.h> | ||
15 | #include <asm/byteorder.h> | 14 | #include <asm/byteorder.h> |
16 | #include <uapi/linux/kernel.h> | 15 | #include <uapi/linux/kernel.h> |
17 | 16 | ||
diff --git a/include/linux/printk.h b/include/linux/printk.h index f136b22c7772..987c65ed34e5 100644 --- a/include/linux/printk.h +++ b/include/linux/printk.h | |||
@@ -289,10 +289,11 @@ extern asmlinkage void dump_stack(void) __cold; | |||
289 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) | 289 | no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__) |
290 | #endif | 290 | #endif |
291 | 291 | ||
292 | #include <linux/dynamic_debug.h> | ||
293 | 292 | ||
294 | /* If you are writing a driver, please use dev_dbg instead */ | 293 | /* If you are writing a driver, please use dev_dbg instead */ |
295 | #if defined(CONFIG_DYNAMIC_DEBUG) | 294 | #if defined(CONFIG_DYNAMIC_DEBUG) |
295 | #include <linux/dynamic_debug.h> | ||
296 | |||
296 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ | 297 | /* dynamic_pr_debug() uses pr_fmt() internally so we don't need it here */ |
297 | #define pr_debug(fmt, ...) \ | 298 | #define pr_debug(fmt, ...) \ |
298 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | 299 | dynamic_pr_debug(fmt, ##__VA_ARGS__) |
diff --git a/kernel/module.c b/kernel/module.c index 5f71aa63ed2a..a0f48b8b00da 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -60,6 +60,7 @@ | |||
60 | #include <linux/jump_label.h> | 60 | #include <linux/jump_label.h> |
61 | #include <linux/pfn.h> | 61 | #include <linux/pfn.h> |
62 | #include <linux/bsearch.h> | 62 | #include <linux/bsearch.h> |
63 | #include <linux/dynamic_debug.h> | ||
63 | #include <uapi/linux/module.h> | 64 | #include <uapi/linux/module.h> |
64 | #include "module-internal.h" | 65 | #include "module-internal.h" |
65 | 66 | ||