diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-09-23 05:40:09 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-26 18:34:29 -0700 |
commit | 807540baae406c84dcb9c1c8ef07a56d2d2ae84a (patch) | |
tree | ccd5c2cb57710dd6b73cf8df11eedf67abc14ae4 /drivers/net | |
parent | cb4dfe562cac6fcb544df752e40c1d78000d0712 (diff) |
drivers/net: return operator cleanup
Change "return (EXPR);" to "return EXPR;"
return is not a function, parentheses are not required.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
106 files changed, 762 insertions, 764 deletions
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c index a7b0e5e43a5..ca00f0a1121 100644 --- a/drivers/net/3c523.c +++ b/drivers/net/3c523.c @@ -463,7 +463,7 @@ static int __init do_elmc_probe(struct net_device *dev) /* we didn't find any 3c523 in the slots we checked for */ if (slot == MCA_NOTFOUND) - return ((base_addr || irq) ? -ENXIO : -ENODEV); + return (base_addr || irq) ? -ENXIO : -ENODEV; mca_set_adapter_name(slot, "3Com 3c523 Etherlink/MC"); mca_set_adapter_procfn(slot, (MCA_ProcFn) elmc_getinfo, dev); diff --git a/drivers/net/appletalk/ipddp.c b/drivers/net/appletalk/ipddp.c index 0362c8d31a0..10d0dba572c 100644 --- a/drivers/net/appletalk/ipddp.c +++ b/drivers/net/appletalk/ipddp.c @@ -244,7 +244,7 @@ static int ipddp_delete(struct ipddp_route *rt) } spin_unlock_bh(&ipddp_route_lock); - return (-ENOENT); + return -ENOENT; } /* @@ -259,10 +259,10 @@ static struct ipddp_route* __ipddp_find_route(struct ipddp_route *rt) if(f->ip == rt->ip && f->at.s_net == rt->at.s_net && f->at.s_node == rt->at.s_node) - return (f); + return f; } - return (NULL); + return NULL; } static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) @@ -279,7 +279,7 @@ static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) switch(cmd) { case SIOCADDIPDDPRT: - return (ipddp_create(&rcp)); + return ipddp_create(&rcp); case SIOCFINDIPDDPRT: spin_lock_bh(&ipddp_route_lock); @@ -297,7 +297,7 @@ static int ipddp_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) return -ENOENT; case SIOCDELIPDDPRT: - return (ipddp_delete(&rcp)); + return ipddp_delete(&rcp); default: return -EINVAL; diff --git a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c index adc07551739..e69eead12ec 100644 --- a/drivers/net/appletalk/ltpc.c +++ b/drivers/net/appletalk/ltpc.c @@ -727,7 +727,7 @@ static int sendup_buffer (struct net_device *dev) if (ltc->command != LT_RCVLAP) { printk("unknown command 0x%02x from ltpc card\n",ltc->command); - return(-1); + return -1; } dnode = ltc->dnode; snode = ltc->snode; diff --git a/drivers/net/atarilance.c b/drivers/net/atarilance.c index b57d7dee389..3134e532623 100644 --- a/drivers/net/atarilance.c +++ b/drivers/net/atarilance.c @@ -362,7 +362,7 @@ static void *slow_memcpy( void *dst, const void *src, size_t len ) *cto++ = *cfrom++; MFPDELAY(); } - return( dst ); + return dst; } @@ -449,7 +449,7 @@ static noinline int __init addr_accessible(volatile void *regp, int wordflag, vbr[2] = save_berr; local_irq_restore(flags); - return( ret ); + return ret; } static const struct net_device_ops lance_netdev_ops = { @@ -526,7 +526,7 @@ static unsigned long __init lance_probe1( struct net_device *dev, goto probe_ok; probe_fail: - return( 0 ); + return 0; probe_ok: lp = netdev_priv(dev); @@ -556,7 +556,7 @@ static unsigned long __init lance_probe1( struct net_device *dev, if (request_irq(IRQ_AUTO_5, lance_interrupt, IRQ_TYPE_PRIO, "PAM/Riebl-ST Ethernet", dev)) { printk( "Lance: request for irq %d failed\n", IRQ_AUTO_5 ); - return( 0 ); + return 0; } dev->irq = (unsigned short)IRQ_AUTO_5; } @@ -568,12 +568,12 @@ static unsigned long __init lance_probe1( struct net_device *dev, unsigned long irq = atari_register_vme_int(); if (!irq) { printk( "Lance: request for VME interrupt failed\n" ); - return( 0 ); + return 0; } if (request_irq(irq, lance_interrupt, IRQ_TYPE_PRIO, "Riebl-VME Ethernet", dev)) { printk( "Lance: request for irq %ld failed\n", irq ); - return( 0 ); + return 0; } dev->irq = irq; } @@ -637,7 +637,7 @@ static unsigned long __init lance_probe1( struct net_device *dev, /* XXX MSch */ dev->watchdog_timeo = TX_TIMEOUT; - return( 1 ); + return 1; } @@ -666,7 +666,7 @@ static int lance_open( struct net_device *dev ) DPRINTK( 2, ( "lance_open(): opening %s failed, i=%d, csr0=%04x\n", dev->name, i, DREG )); DREG = CSR0_STOP; - return( -EIO ); + return -EIO; } DREG = CSR0_IDON; DREG = CSR0_STRT; @@ -676,7 +676,7 @@ static int lance_open( struct net_device *dev ) DPRINTK( 2, ( "%s: LANCE is open, csr0 %04x\n", dev->name, DREG )); - return( 0 ); + return 0; } @@ -1126,13 +1126,13 @@ static int lance_set_mac_address( struct net_device *dev, void *addr ) int i; if (lp->cardtype != OLD_RIEBL && lp->cardtype != NEW_RIEBL) - return( -EOPNOTSUPP ); + return -EOPNOTSUPP; if (netif_running(dev)) { /* Only possible while card isn't started */ DPRINTK( 1, ( "%s: hwaddr can be set only while card isn't open.\n", dev->name )); - return( -EIO ); + return -EIO; } memcpy( dev->dev_addr, saddr->sa_data, dev->addr_len ); @@ -1142,7 +1142,7 @@ static int lance_set_mac_address( struct net_device *dev, void *addr ) /* set also the magic for future sessions */ *RIEBL_MAGIC_ADDR = RIEBL_MAGIC; - return( 0 ); + return 0; } diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index e1e0171d6e6..4ba6431deee 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c @@ -2094,9 +2094,9 @@ static u16 atl1_tpd_avail(struct atl1_tpd_ring *tpd_ring) { u16 next_to_clean = atomic_read(&tpd_ring->next_to_clean); u16 next_to_use = atomic_read(&tpd_ring->next_to_use); - return ((next_to_clean > next_to_use) ? + return (next_to_clean > next_to_use) ? next_to_clean - next_to_use - 1 : - tpd_ring->count + next_to_clean - next_to_use - 1); + tpd_ring->count + next_to_clean - next_to_use - 1; } static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb, diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 34abcc9403d..0db28b411e8 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c @@ -98,9 +98,9 @@ static void be_async_link_state_process(struct be_adapter *adapter, static inline bool is_link_state_evt(u32 trailer) { - return (((trailer >> ASYNC_TRAILER_EVENT_CODE_SHIFT) & + return ((trailer >> ASYNC_TRAILER_EVENT_CODE_SHIFT) & ASYNC_TRAILER_EVENT_CODE_MASK) == - ASYNC_EVENT_CODE_LINK_STATE); + ASYNC_EVENT_CODE_LINK_STATE; } static struct be_mcc_compl *be_mcc_compl_get(struct be_adapter *adapter) diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c index 9322699bb31..a1b8c8b8010 100644 --- a/drivers/net/bmac.c +++ b/drivers/net/bmac.c @@ -1581,7 +1581,7 @@ bmac_proc_info(char *buffer, char **start, off_t offset, int length) int i; if (bmac_devs == NULL) - return (-ENOSYS); + return -ENOSYS; len += sprintf(buffer, "BMAC counters & registers\n"); diff --git a/drivers/net/bna/bna_ctrl.c b/drivers/net/bna/bna_ctrl.c index f3034d6bda5..ddd922f210c 100644 --- a/drivers/net/bna/bna_ctrl.c +++ b/drivers/net/bna/bna_ctrl.c @@ -25,8 +25,8 @@ static int bna_is_aen(u8 msg_id) { - return (msg_id == BFI_LL_I2H_LINK_DOWN_AEN || - msg_id == BFI_LL_I2H_LINK_UP_AEN); + return msg_id == BFI_LL_I2H_LINK_DOWN_AEN || + msg_id == BFI_LL_I2H_LINK_UP_AEN; } static void @@ -1702,7 +1702,7 @@ bna_device_cb_port_stopped(void *arg, enum bna_cb_status status) int bna_device_status_get(struct bna_device *device) { - return (device->fsm == (bfa_fsm_t)bna_device_sm_ready); + return device->fsm == (bfa_fsm_t)bna_device_sm_ready; } void |