diff options
author | Joe Perches <joe@perches.com> | 2009-12-03 02:58:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-03 16:18:01 -0500 |
commit | 8e95a2026f3b43f7c3d676adaccd2de9532e8dcc (patch) | |
tree | 3733318168cd512480b6db58c5c16d1c8847f0b7 /drivers/net/wan | |
parent | 3454f835837609d60b29a266e3bd9d701073b060 (diff) |
drivers/net: Move && and || to end of previous line
Only files where David Miller is the primary git-signer.
wireless, wimax, ixgbe, etc are not modified.
Compile tested x86 allyesconfig only
Not all files compiled (not x86 compatible)
Added a few > 80 column lines, which I ignored.
Existing checkpatch complaints ignored.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wan')
-rw-r--r-- | drivers/net/wan/farsync.c | 12 | ||||
-rw-r--r-- | drivers/net/wan/pc300_drv.c | 17 | ||||
-rw-r--r-- | drivers/net/wan/sbni.c | 28 | ||||
-rw-r--r-- | drivers/net/wan/x25_asy.c | 4 |
4 files changed, 30 insertions, 31 deletions
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index beda387f2fc7..9bc2e3649157 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c | |||
@@ -1346,8 +1346,8 @@ do_bottom_half_tx(struct fst_card_info *card) | |||
1346 | 1346 | ||
1347 | dev = port_to_dev(port); | 1347 | dev = port_to_dev(port); |
1348 | while (!(FST_RDB(card, txDescrRing[pi][port->txpos].bits) & | 1348 | while (!(FST_RDB(card, txDescrRing[pi][port->txpos].bits) & |
1349 | DMA_OWN) | 1349 | DMA_OWN) && |
1350 | && !(card->dmatx_in_progress)) { | 1350 | !(card->dmatx_in_progress)) { |
1351 | /* | 1351 | /* |
1352 | * There doesn't seem to be a txdone event per-se | 1352 | * There doesn't seem to be a txdone event per-se |
1353 | * We seem to have to deduce it, by checking the DMA_OWN | 1353 | * We seem to have to deduce it, by checking the DMA_OWN |
@@ -1379,8 +1379,8 @@ do_bottom_half_tx(struct fst_card_info *card) | |||
1379 | */ | 1379 | */ |
1380 | FST_WRW(card, txDescrRing[pi][port->txpos].bcnt, | 1380 | FST_WRW(card, txDescrRing[pi][port->txpos].bcnt, |
1381 | cnv_bcnt(skb->len)); | 1381 | cnv_bcnt(skb->len)); |
1382 | if ((skb->len < FST_MIN_DMA_LEN) | 1382 | if ((skb->len < FST_MIN_DMA_LEN) || |
1383 | || (card->family == FST_FAMILY_TXP)) { | 1383 | (card->family == FST_FAMILY_TXP)) { |
1384 | /* Enqueue the packet with normal io */ | 1384 | /* Enqueue the packet with normal io */ |
1385 | memcpy_toio(card->mem + | 1385 | memcpy_toio(card->mem + |
1386 | BUF_OFFSET(txBuffer[pi] | 1386 | BUF_OFFSET(txBuffer[pi] |
@@ -2030,8 +2030,8 @@ fst_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
2030 | /* Sanity check the parameters. We don't support partial writes | 2030 | /* Sanity check the parameters. We don't support partial writes |
2031 | * when going over the top | 2031 | * when going over the top |
2032 | */ | 2032 | */ |
2033 | if (wrthdr.size > FST_MEMSIZE || wrthdr.offset > FST_MEMSIZE | 2033 | if (wrthdr.size > FST_MEMSIZE || wrthdr.offset > FST_MEMSIZE || |
2034 | || wrthdr.size + wrthdr.offset > FST_MEMSIZE) { | 2034 | wrthdr.size + wrthdr.offset > FST_MEMSIZE) { |
2035 | return -ENXIO; | 2035 | return -ENXIO; |
2036 | } | 2036 | } |
2037 | 2037 | ||
diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c index 79dabc557bd3..aec4d3955420 100644 --- a/drivers/net/wan/pc300_drv.c +++ b/drivers/net/wan/pc300_drv.c | |||
@@ -514,8 +514,8 @@ static int dma_buf_read(pc300_t * card, int ch, struct sk_buff *skb) | |||
514 | RX_BD_ADDR(ch, chan->rx_first_bd)); | 514 | RX_BD_ADDR(ch, chan->rx_first_bd)); |
515 | while ((status = cpc_readb(&ptdescr->status)) & DST_OSB) { | 515 | while ((status = cpc_readb(&ptdescr->status)) & DST_OSB) { |
516 | nchar = cpc_readw(&ptdescr->len); | 516 | nchar = cpc_readw(&ptdescr->len); |
517 | if ((status & (DST_OVR | DST_CRC | DST_RBIT | DST_SHRT | DST_ABT)) | 517 | if ((status & (DST_OVR | DST_CRC | DST_RBIT | DST_SHRT | DST_ABT)) || |
518 | || (nchar > BD_DEF_LEN)) { | 518 | (nchar > BD_DEF_LEN)) { |
519 | 519 | ||
520 | if (nchar > BD_DEF_LEN) | 520 | if (nchar > BD_DEF_LEN) |
521 | status |= DST_RBIT; | 521 | status |= DST_RBIT; |
@@ -1428,8 +1428,7 @@ static void falc_update_stats(pc300_t * card, int ch) | |||
1428 | 1428 | ||
1429 | if (((conf->media == IF_IFACE_T1) && | 1429 | if (((conf->media == IF_IFACE_T1) && |
1430 | (cpc_readb(falcbase + F_REG(FRS1, ch)) & FRS1_LLBAD) && | 1430 | (cpc_readb(falcbase + F_REG(FRS1, ch)) & FRS1_LLBAD) && |
1431 | (!(cpc_readb(falcbase + F_REG(FRS1, ch)) & FRS1_PDEN))) | 1431 | (!(cpc_readb(falcbase + F_REG(FRS1, ch)) & FRS1_PDEN))) || |
1432 | || | ||
1433 | ((conf->media == IF_IFACE_E1) && | 1432 | ((conf->media == IF_IFACE_E1) && |
1434 | (cpc_readb(falcbase + F_REG(RSP, ch)) & RSP_LLBAD))) { | 1433 | (cpc_readb(falcbase + F_REG(RSP, ch)) & RSP_LLBAD))) { |
1435 | pfalc->prbs = 2; | 1434 | pfalc->prbs = 2; |
@@ -2285,8 +2284,8 @@ static void falc_e1_intr(pc300_t * card, int ch) | |||
2285 | if (gis & GIS_ISR1) { | 2284 | if (gis & GIS_ISR1) { |
2286 | isr1 = cpc_readb(falcbase + F_REG(FISR1, ch)); | 2285 | isr1 = cpc_readb(falcbase + F_REG(FISR1, ch)); |
2287 | if (isr1 & FISR1_XMB) { | 2286 | if (isr1 & FISR1_XMB) { |
2288 | if ((pfalc->xmb_cause & 2) | 2287 | if ((pfalc->xmb_cause & 2) && |
2289 | && pfalc->multiframe_mode) { | 2288 | pfalc->multiframe_mode) { |
2290 | if (cpc_readb (falcbase + F_REG(FRS0, ch)) & | 2289 | if (cpc_readb (falcbase + F_REG(FRS0, ch)) & |
2291 | (FRS0_LOS | FRS0_AIS | FRS0_LFA)) { | 2290 | (FRS0_LOS | FRS0_AIS | FRS0_LFA)) { |
2292 | cpc_writeb(falcbase + F_REG(XSP, ch), | 2291 | cpc_writeb(falcbase + F_REG(XSP, ch), |
@@ -2639,9 +2638,9 @@ static int cpc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) | |||
2639 | !(cpc_readb (scabase + M_REG(CTL, ch)) & CTL_DTR); | 2638 | !(cpc_readb (scabase + M_REG(CTL, ch)) & CTL_DTR); |
2640 | /* There is no DSR in HD64572 */ | 2639 | /* There is no DSR in HD64572 */ |
2641 | } | 2640 | } |
2642 | if (!arg | 2641 | if (!arg || |
2643 | || copy_to_user(arg, &pc300status, sizeof(pc300status_t))) | 2642 | copy_to_user(arg, &pc300status, sizeof(pc300status_t))) |
2644 | return -EINVAL; | 2643 | return -EINVAL; |
2645 | return 0; | 2644 | return 0; |
2646 | } | 2645 | } |
2647 | 2646 | ||
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c index 1cc24a45f003..25477b5cde47 100644 --- a/drivers/net/wan/sbni.c +++ b/drivers/net/wan/sbni.c | |||
@@ -195,9 +195,9 @@ static unsigned int netcard_portlist[ ] __initdata = { | |||
195 | static inline int __init | 195 | static inline int __init |
196 | sbni_isa_probe( struct net_device *dev ) | 196 | sbni_isa_probe( struct net_device *dev ) |
197 | { | 197 | { |
198 | if( dev->base_addr > 0x1ff | 198 | if( dev->base_addr > 0x1ff && |
199 | && request_region( dev->base_addr, SBNI_IO_EXTENT, dev->name ) | 199 | request_region( dev->base_addr, SBNI_IO_EXTENT, dev->name ) && |
200 | && sbni_probe1( dev, dev->base_addr, dev->irq ) ) | 200 | sbni_probe1( dev, dev->base_addr, dev->irq ) ) |
201 | 201 | ||
202 | return 0; | 202 | return 0; |
203 | else { | 203 | else { |
@@ -286,8 +286,8 @@ static int __init sbni_init(struct net_device *dev) | |||
286 | 286 | ||
287 | for( i = 0; netcard_portlist[ i ]; ++i ) { | 287 | for( i = 0; netcard_portlist[ i ]; ++i ) { |
288 | int ioaddr = netcard_portlist[ i ]; | 288 | int ioaddr = netcard_portlist[ i ]; |
289 | if( request_region( ioaddr, SBNI_IO_EXTENT, dev->name ) | 289 | if( request_region( ioaddr, SBNI_IO_EXTENT, dev->name ) && |
290 | && sbni_probe1( dev, ioaddr, 0 )) | 290 | sbni_probe1( dev, ioaddr, 0 )) |
291 | return 0; | 291 | return 0; |
292 | } | 292 | } |
293 | 293 | ||
@@ -306,9 +306,9 @@ sbni_pci_probe( struct net_device *dev ) | |||
306 | unsigned long pci_ioaddr; | 306 | unsigned long pci_ioaddr; |
307 | u16 subsys; | 307 | u16 subsys; |
308 | 308 | ||
309 | if( pdev->vendor != SBNI_PCI_VENDOR | 309 | if( pdev->vendor != SBNI_PCI_VENDOR && |
310 | && pdev->device != SBNI_PCI_DEVICE ) | 310 | pdev->device != SBNI_PCI_DEVICE ) |
311 | continue; | 311 | continue; |
312 | 312 | ||
313 | pci_ioaddr = pci_resource_start( pdev, 0 ); | 313 | pci_ioaddr = pci_resource_start( pdev, 0 ); |
314 | pci_irq_line = pdev->irq; | 314 | pci_irq_line = pdev->irq; |
@@ -977,8 +977,8 @@ check_fhdr( u32 ioaddr, u32 *framelen, u32 *frameno, u32 *ack, | |||
977 | *ack = *framelen & FRAME_ACK_MASK; | 977 | *ack = *framelen & FRAME_ACK_MASK; |
978 | *is_first = (*framelen & FRAME_FIRST) != 0; | 978 | *is_first = (*framelen & FRAME_FIRST) != 0; |
979 | 979 | ||
980 | if( (*framelen &= FRAME_LEN_MASK) < 6 | 980 | if( (*framelen &= FRAME_LEN_MASK) < 6 || |
981 | || *framelen > SBNI_MAX_FRAME - 3 ) | 981 | *framelen > SBNI_MAX_FRAME - 3 ) |
982 | return 0; | 982 | return 0; |
983 | 983 | ||
984 | value = inb( ioaddr + DAT ); | 984 | value = inb( ioaddr + DAT ); |
@@ -1173,10 +1173,10 @@ sbni_open( struct net_device *dev ) | |||
1173 | if( dev->base_addr < 0x400 ) { /* ISA only */ | 1173 | if( dev->base_addr < 0x400 ) { /* ISA only */ |
1174 | struct net_device **p = sbni_cards; | 1174 | struct net_device **p = sbni_cards; |
1175 | for( ; *p && p < sbni_cards + SBNI_MAX_NUM_CARDS; ++p ) | 1175 | for( ; *p && p < sbni_cards + SBNI_MAX_NUM_CARDS; ++p ) |
1176 | if( (*p)->irq == dev->irq | 1176 | if( (*p)->irq == dev->irq && |
1177 | && ((*p)->base_addr == dev->base_addr + 4 | 1177 | ((*p)->base_addr == dev->base_addr + 4 || |
1178 | || (*p)->base_addr == dev->base_addr - 4) | 1178 | (*p)->base_addr == dev->base_addr - 4) && |
1179 | && (*p)->flags & IFF_UP ) { | 1179 | (*p)->flags & IFF_UP ) { |
1180 | 1180 | ||
1181 | ((struct net_local *) (netdev_priv(*p))) | 1181 | ((struct net_local *) (netdev_priv(*p))) |
1182 | ->second = dev; | 1182 | ->second = dev; |
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c index 3c325d77939b..b9f520b7db6a 100644 --- a/drivers/net/wan/x25_asy.c +++ b/drivers/net/wan/x25_asy.c | |||
@@ -657,8 +657,8 @@ static void x25_asy_unesc(struct x25_asy *sl, unsigned char s) | |||
657 | 657 | ||
658 | switch (s) { | 658 | switch (s) { |
659 | case X25_END: | 659 | case X25_END: |
660 | if (!test_and_clear_bit(SLF_ERROR, &sl->flags) | 660 | if (!test_and_clear_bit(SLF_ERROR, &sl->flags) && |
661 | && sl->rcount > 2) | 661 | sl->rcount > 2) |
662 | x25_asy_bump(sl); | 662 | x25_asy_bump(sl); |
663 | clear_bit(SLF_ESCAPE, &sl->flags); | 663 | clear_bit(SLF_ESCAPE, &sl->flags); |
664 | sl->rcount = 0; | 664 | sl->rcount = 0; |