From: Joe Perches <joe@perches.com>
To: sai <tsg321@gmail.com>
Cc: gregkh@suse.de, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Staging: cx25821 : fix coding style issues in cx25821-alsa.c
Date: Wed, 28 Apr 2010 10:26:14 -0700 [thread overview]
Message-ID: <1272475574.18228.26.camel@Joe-Laptop.home> (raw)
In-Reply-To: <1272475020-4994-1-git-send-email-tsg321@gmail.com>
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@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)
prev parent reply other threads:[~2010-04-28 17:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-28 17:17 sai
2010-04-28 17:26 ` Joe Perches [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1272475574.18228.26.camel@Joe-Laptop.home \
--to=joe@perches.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=tsg321@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®