Skip to contentSkip to conversation

i2c-ali1563: remove sparse warnings

PATCH Applied Németh Márton 2 participants 2 messages Jan 10, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c-ali1563: remove sparse warnings

From: Márton Németh <[email protected]>

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

---

drivers/i2c/busses/i2c-ali1563.c renamed from drivers/i2c/busses/i2c-ali1563.c.orig +4 -4
@@ -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
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Applied
#1 lore raw
Quoted 24 lines · Németh Márton

From: Márton Németh <[email protected]>

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

---

drivers/i2c/busses/i2c-ali1563.c renamed from drivers/i2c/busses/i2c-ali1563.c.orig +2 -2
@@ -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);

drivers/i2c/busses/i2c-ali1563.c line 165

Quoted 10 lines
drivers/i2c/busses/i2c-ali1563.c renamed from drivers/i2c/busses/i2c-ali1563.c.orig +2 -2
 
 	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.

Signature · 1 line
Jean Delvare