aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-07-30 01:28:12 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-07-30 09:21:05 -0400
commit95b1bc20532c18e3f19cd460c8350350c84ffbb2 (patch)
tree0ec3aef3787c979f1425184e51a157e5e351cdf3 /include/linux
parent771999b65f79264acde4b855e5d35696eca5e80c (diff)
[MTD] MTD_DEBUG always does compile-time typechecks
The current style for debug messages is to ensure they're always parsed by the compiler and then subjected to dead code removal. That way builds won't break only when debug options get enabled, which is common when they are stripped out early by CPP. This patch makes CONFIG_MTD_DEBUG adopt that convention. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mtd/mtd.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 4ed40caff4e5..922636548558 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -272,7 +272,11 @@ static inline void mtd_erase_callback(struct erase_info *instr)
272 printk(KERN_INFO args); \ 272 printk(KERN_INFO args); \
273 } while(0) 273 } while(0)
274#else /* CONFIG_MTD_DEBUG */ 274#else /* CONFIG_MTD_DEBUG */
275#define DEBUG(n, args...) do { } while(0) 275#define DEBUG(n, args...) \
276 do { \
277 if (0) \
278 printk(KERN_INFO args); \
279 } while(0)
276 280
277#endif /* CONFIG_MTD_DEBUG */ 281#endif /* CONFIG_MTD_DEBUG */
278 282