summaryrefslogtreecommitdiffstats
path: root/drivers/net/plip.c
diff options
context:
space:
mode:
authorHannes Eder <hannes@hanneseder.net>2008-12-25 23:55:35 -0800
committerDavid S. Miller <davem@davemloft.net>2008-12-25 23:55:35 -0800
commite4c3c13cb4c4985cb62cf28677fc0ace69a8d69f (patch)
tree3e944ccdee5669f517803ed3ab7475c75a35e69a /drivers/net/plip.c
parent2705d4f87c068552f45e5d6feaa5c468a312f761 (diff)
downloadop-kernel-dev-e4c3c13cb4c4985cb62cf28677fc0ace69a8d69f.zip
op-kernel-dev-e4c3c13cb4c4985cb62cf28677fc0ace69a8d69f.tar.gz
drivers/net: fix sparse warnings: make do-while a compound statement
While at it insert some extra curly braces and fix formatting. Fix this sparse warnings: drivers/net/atp.c:811:8: warning: do-while statement is not a compound statement drivers/net/atp.c:813:8: warning: do-while statement is not a compound statement drivers/net/atp.c:815:11: warning: do-while statement is not a compound statement drivers/net/atp.c:817:11: warning: do-while statement is not a compound statement drivers/net/plip.c:642:4: warning: do-while statement is not a compound statement drivers/net/plip.c:647:4: warning: do-while statement is not a compound statement drivers/net/plip.c:820:4: warning: do-while statement is not a compound statement drivers/net/plip.c:825:4: warning: do-while statement is not a compound statement drivers/net/starfire.c:886:3: warning: do-while statement is not a compound statement Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/plip.c')
-rw-r--r--drivers/net/plip.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/plip.c b/drivers/net/plip.c
index 5d904f7..ed8582e 100644
--- a/drivers/net/plip.c
+++ b/drivers/net/plip.c
@@ -638,14 +638,14 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl,
case PLIP_PK_DATA:
lbuf = rcv->skb->data;
- do
+ do {
if (plip_receive(nibble_timeout, dev,
&rcv->nibble, &lbuf[rcv->byte]))
return TIMEOUT;
- while (++rcv->byte < rcv->length.h);
- do
+ } while (++rcv->byte < rcv->length.h);
+ do {
rcv->checksum += lbuf[--rcv->byte];
- while (rcv->byte);
+ } while (rcv->byte);
rcv->state = PLIP_PK_CHECKSUM;
case PLIP_PK_CHECKSUM:
@@ -816,14 +816,14 @@ plip_send_packet(struct net_device *dev, struct net_local *nl,
snd->checksum = 0;
case PLIP_PK_DATA:
- do
+ do {
if (plip_send(nibble_timeout, dev,
&snd->nibble, lbuf[snd->byte]))
return TIMEOUT;
- while (++snd->byte < snd->length.h);
- do
+ } while (++snd->byte < snd->length.h);
+ do {
snd->checksum += lbuf[--snd->byte];
- while (snd->byte);
+ } while (snd->byte);
snd->state = PLIP_PK_CHECKSUM;
case PLIP_PK_CHECKSUM:
OpenPOWER on IntegriCloud