diff options
author | Hannes Eder <hannes@hanneseder.net> | 2008-12-26 08:55:35 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-26 08:55:35 +0100 |
commit | e4c3c13cb4c4985cb62cf28677fc0ace69a8d69f (patch) | |
tree | 3e944ccdee5669f517803ed3ab7475c75a35e69a /drivers/net/plip.c | |
parent | drivers/net: fix sparse warning: use ANSI-style function declaration (diff) | |
download | linux-e4c3c13cb4c4985cb62cf28677fc0ace69a8d69f.tar.xz linux-e4c3c13cb4c4985cb62cf28677fc0ace69a8d69f.zip |
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.c | 16 |
1 files changed, 8 insertions, 8 deletions
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: |