From e4c3c13cb4c4985cb62cf28677fc0ace69a8d69f Mon Sep 17 00:00:00 2001 From: Hannes Eder Date: Thu, 25 Dec 2008 23:55:35 -0800 Subject: 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 Signed-off-by: David S. Miller --- drivers/net/plip.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'drivers/net/plip.c') diff --git a/drivers/net/plip.c b/drivers/net/plip.c index 5d904f73345f..ed8582ea7e54 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: -- cgit v1.2.3