Commit 9c4bbd3d authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] better debug macro safety

From:  Rusty Russell <rusty@rustcorp.com.au>

  I don't think it's misused anywhere, but it's better to be safe.

  Pointed out by Joern Engel.
parent e332a20e
...@@ -260,10 +260,11 @@ extern int unregister_mtd_user (struct mtd_notifier *old); ...@@ -260,10 +260,11 @@ extern int unregister_mtd_user (struct mtd_notifier *old);
#define MTD_DEBUG_LEVEL3 (3) /* Noisy */ #define MTD_DEBUG_LEVEL3 (3) /* Noisy */
#ifdef CONFIG_MTD_DEBUG #ifdef CONFIG_MTD_DEBUG
#define DEBUG(n, args...) \ #define DEBUG(n, args...) \
if (n <= CONFIG_MTD_DEBUG_VERBOSE) { \ do { \
printk(KERN_INFO args); \ if (n <= CONFIG_MTD_DEBUG_VERBOSE) \
} printk(KERN_INFO args); \
} while(0)
#else /* CONFIG_MTD_DEBUG */ #else /* CONFIG_MTD_DEBUG */
#define DEBUG(n, args...) #define DEBUG(n, args...)
#endif /* CONFIG_MTD_DEBUG */ #endif /* CONFIG_MTD_DEBUG */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment