From cc1092019ce3d9b3e85a285b41e852ff94a6b590 Mon Sep 17 00:00:00 2001 From: Bryn Reeves Date: Tue, 3 Oct 2006 01:15:35 -0700 Subject: [PATCH] dm: add debug macro Add CONFIG_DM_DEBUG and DMDEBUG() macro. Signed-off-by: Bryn Reeves Signed-off-by: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/md/dm.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/md/dm.h') diff --git a/drivers/md/dm.h b/drivers/md/dm.h index 3c03c0ecab7..fe701c4834f 100644 --- a/drivers/md/dm.h +++ b/drivers/md/dm.h @@ -21,6 +21,11 @@ #define DMERR(f, arg...) printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) #define DMWARN(f, arg...) printk(KERN_WARNING DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) #define DMINFO(f, arg...) printk(KERN_INFO DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) +#ifdef CONFIG_DM_DEBUG +# define DMDEBUG(f, arg...) printk(KERN_DEBUG DM_NAME ": " DM_MSG_PREFIX " DEBUG: " f "\n", ## arg) +#else +# define DMDEBUG(f, arg...) do {} while (0) +#endif #define DMEMIT(x...) sz += ((sz >= maxlen) ? \ 0 : scnprintf(result + sz, maxlen - sz, x)) -- cgit v1.2.3-18-g5258