From 2e7eb6cc4a3691a7c6b7585893da9dffccaf3165 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 22 Mar 2005 03:37:26 -0800 Subject: [IRDA]: Squash warnings introduced by DEBUG cleanups. Signed-off-by: David S. Miller --- include/net/irda/irda.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h index d055e12fcf64..05a840837fe7 100644 --- a/include/net/irda/irda.h +++ b/include/net/irda/irda.h @@ -66,17 +66,20 @@ extern unsigned int irda_debug; /* use 0 for production, 1 for verification, >2 for debug */ #define IRDA_DEBUG_LEVEL 0 -#define IRDA_DEBUG(n, args...) ( (irda_debug >= (n)) ? \ - (printk(KERN_DEBUG args)) : \ - 0 ) +#define IRDA_DEBUG(n, args...) \ +do { if (irda_debug >= (n)) \ + printk(KERN_DEBUG args); \ +} while (0) #define IRDA_ASSERT(expr, func) \ do { if(!(expr)) { \ printk( "Assertion failed! %s:%s:%d %s\n", \ __FILE__,__FUNCTION__,__LINE__,(#expr) ); \ func } } while (0) +#define IRDA_ASSERT_LABEL(label) label #else -#define IRDA_DEBUG(n, args...) 0 -#define IRDA_ASSERT(expr, func) 0 +#define IRDA_DEBUG(n, args...) do { } while (0) +#define IRDA_ASSERT(expr, func) do { (void)(expr); } while (0) +#define IRDA_ASSERT_LABEL(label) #endif /* CONFIG_IRDA_DEBUG */ #define IRDA_WARNING(args...) printk(KERN_WARNING args) -- cgit v1.2.3