[PATCH 18/27] drivers/net/tulip: fix sparse warnings: make do-while a compound statement

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <netdev@...>
Cc: <kernel-janitors@...>, <linux-kernel@...>
Date: Monday, December 22, 2008 - 3:17 pm

Fix this sparse warnings:

  drivers/net/tulip/de2104x.c:1695:4: warning: do-while statement is not a compound statement
  drivers/net/tulip/tulip_core.c:1433:5: warning: do-while statement is not a compound statement

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
---
 drivers/net/tulip/de2104x.c    |    4 ++--
 drivers/net/tulip/tulip_core.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index 3aa60fa..5166be9 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -1691,9 +1691,9 @@ static void __devinit de21040_get_mac_address (struct de_private *de)
 
 	for (i = 0; i < 6; i++) {
 		int value, boguscnt = 100000;
-		do
+		do {
 			value = dr32(ROMCmd);
-		while (value < 0 && --boguscnt > 0);
+		} while (value < 0 && --boguscnt > 0);
 		de->dev->dev_addr[i] = value;
 		udelay(1);
 		if (boguscnt <= 0)
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
index 1c5ef23..ff84bab 100644
--- a/drivers/net/tulip/tulip_core.c
+++ b/drivers/net/tulip/tulip_core.c
@@ -1429,9 +1429,9 @@ static int __devinit tulip_init_one (struct pci_dev *pdev,
 		for (i = 0; i < 3; i++) {
 			int value, boguscnt = 100000;
 			iowrite32(0x600 | i, ioaddr + 0x98);
-			do
+			do {
 				value = ioread32(ioaddr + CSR9);
-			while (value < 0  && --boguscnt > 0);
+			} while (value < 0  && --boguscnt > 0);
 			put_unaligned_le16(value, ((__le16 *)dev->dev_addr) + i);
 			sum += value & 0xffff;
 		}

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 00/27] drivers/net: fix sparse warnings, Hannes Eder, (Mon Dec 22, 3:14 pm)
[PATCH 18/27] drivers/net/tulip: fix sparse warnings: make d..., Hannes Eder, (Mon Dec 22, 3:17 pm)
[PATCH 08/27] drivers/net/cxgb3: comment out dead code, Hannes Eder, (Mon Dec 22, 3:16 pm)
Re: [PATCH 02/27] drivers/net: fix sparse warnings: make do-..., Krzysztof Halasa, (Tue Dec 23, 12:31 pm)
Re: [PATCH 02/27] drivers/net: fix sparse warnings: make do-..., Krzysztof Halasa, (Tue Dec 23, 10:03 pm)