[PATCH 20/27] drivers/net/wan: 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/wan/wanxl.c:414:3: warning: do-while statement is not a compound statement
  drivers/net/wan/wanxl.c:441:3: warning: do-while statement is not a compound statement

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
---
 drivers/net/wan/wanxl.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c
index 8845949..4bffb67 100644
--- a/drivers/net/wan/wanxl.c
+++ b/drivers/net/wan/wanxl.c
@@ -410,12 +410,12 @@ static int wanxl_open(struct net_device *dev)
 	writel(1 << (DOORBELL_TO_CARD_OPEN_0 + port->node), dbr);
 
 	timeout = jiffies + HZ;
-	do
+	do {
 		if (get_status(port)->open) {
 			netif_start_queue(dev);
 			return 0;
 		}
-	while (time_after(timeout, jiffies));
+	} while (time_after(timeout, jiffies));
 
 	printk(KERN_ERR "%s: unable to open port\n", dev->name);
 	/* ask the card to close the port, should it be still alive */
@@ -437,10 +437,10 @@ static int wanxl_close(struct net_device *dev)
 	       port->card->plx + PLX_DOORBELL_TO_CARD);
 
 	timeout = jiffies + HZ;
-	do
+	do {
 		if (!get_status(port)->open)
 			break;
-	while (time_after(timeout, jiffies));
+	} while (time_after(timeout, jiffies));
 
 	if (get_status(port)->open)
 		printk(KERN_ERR "%s: unable to close port\n", dev->name);

--
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 20/27] drivers/net/wan: fix sparse warnings: make do-..., 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)