[PATCH] Staging: cx25821 : fix coding style issues in cx25821-alsa.c
Joe Perches
joe at perches.com
Wed Apr 28 17:26:14 UTC 2010
On Wed, 2010-04-28 at 22:47 +0530, sai wrote:
> This is a patch to cx25821-alsa.c file that fixes of most of the warning & errors found by checkpatch.pl tool
> Signed-off-by: sai gopal <tsg321 at gmail.com>
> ---
> drivers/staging/cx25821/cx25821-alsa.c | 75 +++++++++++++++++---------------
> 1 files changed, 40 insertions(+), 35 deletions(-)
>
> diff --git a/drivers/staging/cx25821/cx25821-alsa.c b/drivers/staging/cx25821/cx25821-alsa.c
> index 061add3..0890384 100644
> --- a/drivers/staging/cx25821/cx25821-alsa.c
> +++ b/drivers/staging/cx25821/cx25821-alsa.c
[]
> @@ -42,10 +42,10 @@
>
> #define AUDIO_SRAM_CHANNEL SRAM_CH08
>
> -#define dprintk(level,fmt, arg...) if (debug >= level) \
> +#define dprintk(level, fmt, arg...) if (debug >= level) \
> printk(KERN_INFO "%s/1: " fmt, chip->dev->name , ## arg)
>
> -#define dprintk_core(level,fmt, arg...) if (debug >= level) \
> +#define dprintk_core(level, fmt, arg...) if (debug >= level) \
> printk(KERN_DEBUG "%s/1: " fmt, chip->dev->name , ## arg)
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)
More information about the devel
mailing list