aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atp.c
diff options
context:
space:
mode:
authorHannes Eder <hannes@hanneseder.net>2008-12-26 02:55:35 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-26 02:55:35 -0500
commite4c3c13cb4c4985cb62cf28677fc0ace69a8d69f (patch)
tree3e944ccdee5669f517803ed3ab7475c75a35e69a /drivers/net/atp.c
parent2705d4f87c068552f45e5d6feaa5c468a312f761 (diff)
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/atp.c')
-rw-r--r--drivers/net/atp.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/atp.c b/drivers/net/atp.c
index 1d6b74c5d6c9..ea493ce23982 100644
--- a/drivers/net/atp.c
+++ b/drivers/net/atp.c
@@ -802,21 +802,22 @@ static void net_rx(struct net_device *dev)
802 802
803static void read_block(long ioaddr, int length, unsigned char *p, int data_mode) 803static void read_block(long ioaddr, int length, unsigned char *p, int data_mode)
804{ 804{
805
806 if (data_mode <= 3) { /* Mode 0 or 1 */ 805 if (data_mode <= 3) { /* Mode 0 or 1 */
807 outb(Ctrl_LNibRead, ioaddr + PAR_CONTROL); 806 outb(Ctrl_LNibRead, ioaddr + PAR_CONTROL);
808 outb(length == 8 ? RdAddr | HNib | MAR : RdAddr | MAR, 807 outb(length == 8 ? RdAddr | HNib | MAR : RdAddr | MAR,
809 ioaddr + PAR_DATA); 808 ioaddr + PAR_DATA);
810 if (data_mode <= 1) { /* Mode 0 or 1 */ 809 if (data_mode <= 1) { /* Mode 0 or 1 */
811 do *p++ = read_byte_mode0(ioaddr); while (--length > 0); 810 do { *p++ = read_byte_mode0(ioaddr); } while (--length > 0);
812 } else /* Mode 2 or 3 */ 811 } else { /* Mode 2 or 3 */
813 do *p++ = read_byte_mode2(ioaddr); while (--length > 0); 812 do { *p++ = read_byte_mode2(ioaddr); } while (--length > 0);
814 } else if (data_mode <= 5) 813 }
815 do *p++ = read_byte_mode4(ioaddr); while (--length > 0); 814 } else if (data_mode <= 5) {
816 else 815 do { *p++ = read_byte_mode4(ioaddr); } while (--length > 0);
817 do *p++ = read_byte_mode6(ioaddr); while (--length > 0); 816 } else {
817 do { *p++ = read_byte_mode6(ioaddr); } while (--length > 0);
818 }
818 819
819 outb(EOC+HNib+MAR, ioaddr + PAR_DATA); 820 outb(EOC+HNib+MAR, ioaddr + PAR_DATA);
820 outb(Ctrl_SelData, ioaddr + PAR_CONTROL); 821 outb(Ctrl_SelData, ioaddr + PAR_CONTROL);
821} 822}
822 823