[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1272475574.18228.26.camel@Joe-Laptop.home>
Date: Wed, 28 Apr 2010 10:26:14 -0700
From: Joe Perches <joe@...ches.com>
To: sai <tsg321@...il.com>
Cc: gregkh@...e.de, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: cx25821 : fix coding style issues in
cx25821-alsa.c
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@...il.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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists