diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2003-05-26 02:57:52 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-05-26 02:57:52 -0700 |
| commit | 9c4bbd3d137c184874a257698bc0479e2a30a893 (patch) | |
| tree | e40e05bf34a324beadf1c3355db3e2362a960d19 /include/linux | |
| parent | e332a20ecc2ec116764d514503c8ed6e794978a7 (diff) | |
[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.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mtd/mtd.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 503a715fe014..6a57af9f46a3 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h @@ -260,10 +260,11 @@ extern int unregister_mtd_user (struct mtd_notifier *old); #define MTD_DEBUG_LEVEL3 (3) /* Noisy */ #ifdef CONFIG_MTD_DEBUG -#define DEBUG(n, args...) \ - if (n <= CONFIG_MTD_DEBUG_VERBOSE) { \ - printk(KERN_INFO args); \ - } +#define DEBUG(n, args...) \ + do { \ + if (n <= CONFIG_MTD_DEBUG_VERBOSE) \ + printk(KERN_INFO args); \ + } while(0) #else /* CONFIG_MTD_DEBUG */ #define DEBUG(n, args...) #endif /* CONFIG_MTD_DEBUG */ |
