Re: [PATCH] Staging: cx25821 : fix coding style issues in cx25821-alsa.c

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Joe Perches
Date: Wednesday, April 28, 2010 - 10:26 am

On Wed, 2010-04-28 at 22:47 +0530, sai wrote:
[]

These macros should really be do {macro} while (0)
so that they can be simply used in an if/else

#define dprintk(level, fmt, arg...)					\
do {									\
	if (debug >= level)						\
		printk(KERN_INFO "%s/1: " fmt, chip->dev->name, ##arg);	\
} while (0)


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] Staging: cx25821 : fix coding style issues in ..., Joe Perches, (Wed Apr 28, 10:26 am)