linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Németh Márton" <nm127@freemail.hu>
To: Jean Delvare <khali@linux-fr.org>, Ben Dooks <ben-linux@fluff.org>
Cc: linux-i2c@vger.kernel.org, cocci@diku.dk,
	LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] i2c-ali1563: remove sparse warnings
Date: Sun, 10 Jan 2010 15:33:23 +0100	[thread overview]
Message-ID: <4B49E533.8050808@freemail.hu> (raw)

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",
_______________________________________________
Cocci mailing list
Cocci@diku.dk
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

             reply	other threads:[~2010-01-10 14:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-10 14:33 Németh Márton [this message]
     [not found] ` <4B49E533.8050808-Y8qEzhMunLyT9ig0jae3mg@public.gmane.org>
2010-01-10 15:45   ` [PATCH] i2c-ali1563: remove sparse warnings 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=4B49E533.8050808@freemail.hu \
    --to=nm127@freemail.hu \
    --cc=ben-linux@fluff.org \
    --cc=cocci@diku.dk \
    --cc=khali@linux-fr.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).