From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: "Németh Márton" <nm127-Y8qEzhMunLyT9ig0jae3mg@public.gmane.org>
Cc: Ben Dooks <ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Julia Lawall <julia-dAYI7NvHqcQ@public.gmane.org>,
cocci-dAYI7NvHqcQ@public.gmane.org
Subject: Re: [PATCH] i2c-ali1563: remove sparse warnings
Date: Sun, 10 Jan 2010 16:45:08 +0100 [thread overview]
Message-ID: <20100110164508.51fc29a7@hyperion.delvare> (raw)
In-Reply-To: <4B49E533.8050808-Y8qEzhMunLyT9ig0jae3mg@public.gmane.org>
On Sun, 10 Jan 2010 15:33:23 +0100, Németh Márton wrote:
> From: Márton Németh <nm127-Y8qEzhMunLyT9ig0jae3mg@public.gmane.org>
>
> Remove the following sparse warnings (see "make C=1"):
> * drivers/i2c/busses/i2c-ali1563.c:91:3: warning: do-while statement is not a compound statement
> * drivers/i2c/busses/i2c-ali1563.c:161:3: warning: do-while statement is not a compound statement
>
> Signed-off-by: Márton Németh <nm127-Y8qEzhMunLyT9ig0jae3mg@public.gmane.org>
> ---
> --- linux/drivers/i2c/busses/i2c-ali1563.c.orig 2010-01-10 13:40:31.000000000 +0100
> +++ linux/drivers/i2c/busses/i2c-ali1563.c 2010-01-10 13:54:16.000000000 +0100
> @@ -87,9 +87,9 @@
> outb_p(inb_p(SMB_HST_CNTL2) | HST_CNTL2_START, SMB_HST_CNTL2);
>
> timeout = ALI1563_MAX_TIMEOUT;
> - do
> + do {
> msleep(1);
> - while (((data = inb_p(SMB_HST_STS)) & HST_STS_BUSY) && --timeout);
> + } while (((data = inb_p(SMB_HST_STS)) & HST_STS_BUSY) && --timeout);
>
> dev_dbg(&a->dev, "Transaction (post): STS=%02x, CNTL1=%02x, "
> "CNTL2=%02x, CMD=%02x, ADD=%02x, DAT0=%02x, DAT1=%02x\n",
> @@ -157,9 +157,9 @@
> outb_p(inb_p(SMB_HST_CNTL2) | HST_CNTL2_START, SMB_HST_CNTL2);
>
> timeout = ALI1563_MAX_TIMEOUT;
> - do
> + do {
> msleep(1);
> - while (!((data = inb_p(SMB_HST_STS)) & HST_STS_DONE) && --timeout);
> + } while (!((data = inb_p(SMB_HST_STS)) & HST_STS_DONE) && --timeout);
>
> dev_dbg(&a->dev, "Block (post): STS=%02x, CNTL1=%02x, "
> "CNTL2=%02x, CMD=%02x, ADD=%02x, DAT0=%02x, DAT1=%02x\n",
Applied, thanks.
--
Jean Delvare
WARNING: multiple messages have this Message-ID (diff)
From: Jean Delvare <khali@linux-fr.org>
To: "Németh Márton" <nm127@freemail.hu>
Cc: Ben Dooks <ben-linux@fluff.org>,
linux-i2c@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
Julia Lawall <julia@diku.dk>,
cocci@diku.dk
Subject: Re: [PATCH] i2c-ali1563: remove sparse warnings
Date: Sun, 10 Jan 2010 16:45:08 +0100 [thread overview]
Message-ID: <20100110164508.51fc29a7@hyperion.delvare> (raw)
In-Reply-To: <4B49E533.8050808@freemail.hu>
On Sun, 10 Jan 2010 15:33:23 +0100, Németh Márton wrote:
> From: Márton Németh <nm127@freemail.hu>
>
> Remove the following sparse warnings (see "make C=1"):
> * drivers/i2c/busses/i2c-ali1563.c:91:3: warning: do-while statement is not a compound statement
> * drivers/i2c/busses/i2c-ali1563.c:161:3: warning: do-while statement is not a compound statement
>
> Signed-off-by: Márton Németh <nm127@freemail.hu>
> ---
> --- linux/drivers/i2c/busses/i2c-ali1563.c.orig 2010-01-10 13:40:31.000000000 +0100
> +++ linux/drivers/i2c/busses/i2c-ali1563.c 2010-01-10 13:54:16.000000000 +0100
> @@ -87,9 +87,9 @@
> outb_p(inb_p(SMB_HST_CNTL2) | HST_CNTL2_START, SMB_HST_CNTL2);
>
> timeout = ALI1563_MAX_TIMEOUT;
> - do
> + do {
> msleep(1);
> - while (((data = inb_p(SMB_HST_STS)) & HST_STS_BUSY) && --timeout);
> + } while (((data = inb_p(SMB_HST_STS)) & HST_STS_BUSY) && --timeout);
>
> dev_dbg(&a->dev, "Transaction (post): STS=%02x, CNTL1=%02x, "
> "CNTL2=%02x, CMD=%02x, ADD=%02x, DAT0=%02x, DAT1=%02x\n",
> @@ -157,9 +157,9 @@
> outb_p(inb_p(SMB_HST_CNTL2) | HST_CNTL2_START, SMB_HST_CNTL2);
>
> timeout = ALI1563_MAX_TIMEOUT;
> - do
> + do {
> msleep(1);
> - while (!((data = inb_p(SMB_HST_STS)) & HST_STS_DONE) && --timeout);
> + } while (!((data = inb_p(SMB_HST_STS)) & HST_STS_DONE) && --timeout);
>
> dev_dbg(&a->dev, "Block (post): STS=%02x, CNTL1=%02x, "
> "CNTL2=%02x, CMD=%02x, ADD=%02x, DAT0=%02x, DAT1=%02x\n",
Applied, thanks.
--
Jean Delvare
next prev parent reply other threads:[~2010-01-10 15:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-10 14:33 [PATCH] i2c-ali1563: remove sparse warnings Németh Márton
2010-01-10 14:33 ` Németh Márton
[not found] ` <4B49E533.8050808-Y8qEzhMunLyT9ig0jae3mg@public.gmane.org>
2010-01-10 15:45 ` Jean Delvare [this message]
2010-01-10 15:45 ` Jean Delvare
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=20100110164508.51fc29a7@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org \
--cc=cocci-dAYI7NvHqcQ@public.gmane.org \
--cc=julia-dAYI7NvHqcQ@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nm127-Y8qEzhMunLyT9ig0jae3mg@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.