drivers/net: return operator cleanup
Subsystems (12)
PATCH 1/1 drivers/net: return operator cleanup
Change "return (EXPR);" to "return EXPR;"
return is not a function, parentheses are not required.
--- drivers/net/3c523.c | 2 drivers/net/appletalk/ipddp.c | 10 drivers/net/appletalk/ltpc.c | 2 drivers/net/atarilance.c | 24 - drivers/net/atlx/atl1.c | 4 drivers/net/benet/be_cmds.c | 4 drivers/net/bmac.c | 2 drivers/net/bna/bna_ctrl.c | 6 drivers/net/bnx2.c | 20 - drivers/net/bnx2x/bnx2x_cmn.h | 4 drivers/net/bonding/bond_3ad.c | 2 drivers/net/bsd_comp.c | 2 drivers/net/cassini.c | 4 drivers/net/chelsio/sge.c | 2 drivers/net/chelsio/vsc7326.c | 2 drivers/net/cxgb3/cxgb3_offload.c | 2 drivers/net/de620.c | 2 drivers/net/defxx.c | 66 +-- drivers/net/e100.c | 4 drivers/net/e1000/e1000_main.c | 2 drivers/net/e1000e/ethtool.c | 4 drivers/net/e1000e/netdev.c | 2 drivers/net/enic/vnic_rq.h | 2 drivers/net/eth16i.c | 12 drivers/net/forcedeth.c | 2 drivers/net/fsl_pq_mdio.c | 4 drivers/net/gianfar_ethtool.c | 4 drivers/net/hamradio/bpqether.c | 2 drivers/net/hamradio/hdlcdrv.c | 2 drivers/net/hp100.c | 6 drivers/net/ibm_newemac/core.c | 6 drivers/net/ibm_newemac/core.h | 6 drivers/net/igb/igb_main.c | 2 drivers/net/igbvf/ethtool.c | 2 drivers/net/igbvf/netdev.c | 2 drivers/net/irda/donauboe.c | 4 drivers/net/irda/irda-usb.c | 2 drivers/net/irda/nsc-ircc.c | 2 drivers/net/irda/sir_dev.c | 2 drivers/net/irda/smsc-ircc2.c | 2 drivers/net/irda/stir4200.c | 2 drivers/net/irda/via-ircc.h | 2 drivers/net/irda/vlsi_ir.h | 2 drivers/net/ixgb/ixgb_ee.c | 32 - drivers/net/ixgb/ixgb_ethtool.c | 2 drivers/net/ixgb/ixgb_hw.c | 14 drivers/net/ixgbe/ixgbe_ethtool.c | 6 drivers/net/ixgbe/ixgbe_main.c | 2 drivers/net/ixgbevf/ixgbevf_main.c | 2 drivers/net/ll_temac_main.c | 2 drivers/net/lp486e.c | 2 drivers/net/meth.c | 2 drivers/net/mlx4/en_selftest.c | 2 drivers/net/myri10ge/myri10ge.c | 6 drivers/net/myri_sbus.c | 2 drivers/net/netxen/netxen_nic_init.c | 4 drivers/net/netxen/netxen_nic_main.c | 2 drivers/net/niu.c | 13 drivers/net/pcmcia/nmclan_cs.c | 2 drivers/net/pcmcia/smc91c92_cs.c | 2 drivers/net/pcnet32.c | 4 drivers/net/ps3_gelic_wireless.c | 6 drivers/net/qlcnic/qlcnic_main.c | 2 drivers/net/sfc/net_driver.h | 2 drivers/net/sfc/nic.c | 10 drivers/net/sis900.c | 6 drivers/net/skfp/cfm.c | 10 drivers/net/skfp/drvfbi.c | 16 drivers/net/skfp/ess.c | 46 +- drivers/net/skfp/fplustm.c | 24 - drivers/net/skfp/hwmtm.c | 30 - drivers/net/skfp/hwt.c | 4 drivers/net/skfp/pcmplc.c | 22 - drivers/net/skfp/pmf.c | 62 +-- drivers/net/skfp/queue.c | 2 drivers/net/skfp/skfddi.c | 32 - drivers/net/skfp/smt.c | 78 +-- drivers/net/skfp/smtdef.c | 4 drivers/net/skfp/smtinit.c | 2 drivers/net/skfp/srf.c | 2 drivers/net/slip.c | 2 drivers/net/sun3lance.c | 4 drivers/net/sungem_phy.c | 2 drivers/net/sunhme.c | 2 drivers/net/sunqe.c | 2 drivers/net/tc35815.c | 2 drivers/net/tg3.c | 5 drivers/net/tlan.c | 2 drivers/net/tlan.h | 8 drivers/net/tokenring/proteon.c | 2 drivers/net/tokenring/smctr.c | 500 ++++++++++++------------- drivers/net/tokenring/tms380tr.c | 58 +- drivers/net/tsi108_eth.c | 2 drivers/net/tulip/de4x5.c | 36 - drivers/net/tulip/uli526x.c | 2 drivers/net/typhoon.c | 2 drivers/net/usb/sierra_net.c | 4 drivers/net/veth.c | 2 drivers/net/wan/dlci.c | 42 +- drivers/net/wan/lmc/lmc_main.c | 4 drivers/net/wan/n2.c | 4 drivers/net/wan/pc300_drv.c | 18 drivers/net/wan/pc300_tty.c | 2 drivers/net/wan/sdla.c | 108 ++--- drivers/net/wan/x25_asy.c | 2 drivers/net/xen-netfront.c | 6 106 files changed, 762 insertions(+), 764 deletions(-)
drivers/net/3c523.c +1 -1
@@ -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);
drivers/net/appletalk/ipddp.c +5 -5
@@ -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 ;
drivers/net/appletalk/ltpc.c +1 -1
@@ -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;
drivers/net/atarilance.c +12 -12
@@ -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 ; }
drivers/net/atlx/atl1.c +2 -2
@@ -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,
drivers/net/benet/be_cmds.c +2 -2
@@ -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)
drivers/net/bmac.c +1 -1
@@ -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" );
drivers/net/bna/bna_ctrl.c +3 -3
@@ -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
drivers/net/bnx2.c +10 -10
@@ -266,7 +266,7 @@ static inline u32 bnx2_tx_avail(struct bnx2 *bp, struct bnx2_tx_ring_info *txr)if (diff ==TX_DESC_CNT ) diff =MAX_TX_DESC_CNT ; } -return (bp->tx_ring_size - diff); +return bp->tx_ring_size - diff; } static u32
@@ -299,7 +299,7 @@ bnx2_shmem_wr(struct bnx2 *bp, u32 offset, u32 val)static u32 bnx2_shmem_rd (struct bnx2 *bp,u32 offset) { -return (bnx2_reg_rd_ind (bp, bp->shmem_base + offset)); +return bnx2_reg_rd_ind (bp, bp->shmem_base + offset); } static void
@@ -977,9 +977,9 @@ bnx2_report_fw_link(struct bnx2 *bp)static char *bnx2_xceiver_str (struct bnx2 *bp) { -return ((bp->phy_port ==PORT_FIBRE ) ?"SerDes" : +return (bp->phy_port ==PORT_FIBRE ) ?"SerDes" : ((bp->phy_flags &BNX2_PHY_FLAG_SERDES ) ?"Remote Copper" : -"Copper" )); +"Copper" ); } static void
@@ -1758,7 +1758,7 @@ __acquires(&bp->phy_lock)u32 new_adv =0 ;if (bp->phy_flags &BNX2_PHY_FLAG_REMOTE_PHY_CAP ) -return (bnx2_setup_remote_phy (bp, port)); +return bnx2_setup_remote_phy (bp, port);if (!(bp->autoneg &AUTONEG_SPEED )) {u32 new_bmcr;
@@ -2171,10 +2171,10 @@ __acquires(&bp->phy_lock)return 0 ;if (bp->phy_flags &BNX2_PHY_FLAG_SERDES ) { -return (bnx2_setup_serdes_phy (bp, port)); +return bnx2_setup_serdes_phy (bp, port); }else { -return (bnx2_setup_copper_phy (bp)); +return bnx2_setup_copper_phy (bp); } }
@@ -7582,9 +7582,9 @@ bnx2_set_tx_csum(struct net_device *dev, u32 data)struct bnx2 *bp =netdev_priv (dev);if (CHIP_NUM (bp) ==CHIP_NUM_5709 ) -return (ethtool_op_set_tx_ipv6_csum (dev, data)); +return ethtool_op_set_tx_ipv6_csum (dev, data);else -return (ethtool_op_set_tx_csum (dev, data)); +return ethtool_op_set_tx_csum (dev, data); } static int
@@ -7705,7 +7705,7 @@ bnx2_change_mtu(struct net_device *dev, int new_mtu)return -EINVAL ; dev->mtu = new_mtu; -return (bnx2_change_ring_size (bp, bp->rx_ring_size, bp->tx_ring_size)); +return bnx2_change_ring_size (bp, bp->rx_ring_size, bp->tx_ring_size); }#ifdef CONFIG_NET_POLL_CONTROLLER
drivers/net/bnx2x/bnx2x_cmn.h +2 -2
@@ -399,7 +399,7 @@ static inline int bnx2x_has_tx_work_unload(struct bnx2x_fastpath *fp) {/* Tell compiler that consumer and producer can change */ barrier (); -return (fp->tx_pkt_prod != fp->tx_pkt_cons); +return fp->tx_pkt_prod != fp->tx_pkt_cons; }static inline u16 bnx2x_tx_avail (struct bnx2x_fastpath *fp)
@@ -632,7 +632,7 @@ static inline int bnx2x_has_rx_work(struct bnx2x_fastpath *fp) rx_cons_sb =le16_to_cpu (*fp->rx_cons_sb);if ((rx_cons_sb &MAX_RCQ_DESC_CNT ) ==MAX_RCQ_DESC_CNT ) rx_cons_sb++; -return (fp->rx_comp_cons != rx_cons_sb); +return fp->rx_comp_cons != rx_cons_sb; }/* HW Lock for shared dual port PHYs */
drivers/net/bonding/bond_3ad.c +1 -1
@@ -252,7 +252,7 @@ static inline void __enable_port(struct port *port)*/ static inline int __port_is_enabled (struct port *port) { -return (port->slave->state ==BOND_STATE_ACTIVE ); +return port->slave->state ==BOND_STATE_ACTIVE ; }/**
drivers/net/bsd_comp.c +1 -1
@@ -429,7 +429,7 @@ static void *bsd_alloc (unsigned char *options, int opt_len, int decomp)if (!db->lens) {bsd_free (db); -return (NULL ); +return NULL ; } }/*
drivers/net/cassini.c +2 -2
@@ -419,7 +419,7 @@ static u16 cas_phy_read(struct cas *cp, int reg)udelay (10 ); cmd =readl (cp->regs +REG_MIF_FRAME );if (cmd &MIF_FRAME_TURN_AROUND_LSB ) -return (cmd &MIF_FRAME_DATA_MASK ); +return cmd &MIF_FRAME_DATA_MASK ; }return 0xFFFF ;/* -1 */ }
@@ -804,7 +804,7 @@ static int cas_reset_mii_phy(struct cas *cp)break ;udelay (10 ); } -return (limit <=0 ); +return limit <=0 ; }static int cas_saturn_firmware_init (struct cas *cp)
drivers/net/chelsio/sge.c +1 -1
@@ -1551,7 +1551,7 @@ static inline int responses_pending(const struct adapter *adapter)const struct respQ *Q = &adapter->sge->respQ;const struct respQ_e *e = &Q ->entries[Q ->cidx]; -return (e->GenerationBit ==Q ->genbit); +return e->GenerationBit ==Q ->genbit; }/*
drivers/net/chelsio/vsc7326.c +1 -1
@@ -255,7 +255,7 @@ static int bist_rd(adapter_t *adapter, int moduleid, int address)else if ((result & (1 <<8 )) !=0x0 )pr_err ("bist read error: 0x%x\n" , result); -return (result &0xff ); +return result &0xff ; }static int bist_wr (adapter_t *adapter,int moduleid,int address,int value)
drivers/net/cxgb3/cxgb3_offload.c +1 -1
@@ -64,7 +64,7 @@ static inline int offload_activated(struct t3cdev *tdev) {const struct adapter *adapter =tdev2adap (tdev); -return (test_bit (OFFLOAD_DEVMAP_BIT , &adapter->open_device_map)); +return test_bit (OFFLOAD_DEVMAP_BIT , &adapter->open_device_map); }/**
drivers/net/de620.c +1 -1
@@ -676,7 +676,7 @@ static int de620_rx_intr(struct net_device *dev)de620_set_register (dev,W_NPRF , next_rx_page);pr_debug ("next_rx_page=%d CPR=%d\n" , next_rx_page, curr_page); -return (next_rx_page != curr_page);/* That was slightly tricky... */ +return next_rx_page != curr_page;/* That was slightly tricky... */ }/*********************************************
drivers/net/defxx.c +33 -33
245 lines not on this page · raw message
drivers/net/e100.c +2 -2
@@ -2215,10 +2215,10 @@ static int e100_change_mtu(struct net_device *netdev, int new_mtu)static int e100_asf (struct nic *nic) {/* ASF can be enabled from eeprom */ -return ((nic->pdev->device >=0x1050 ) && (nic->pdev->device <=0x1057 ) && +return (nic->pdev->device >=0x1050 ) && (nic->pdev->device <=0x1057 ) && (nic->eeprom[eeprom_config_asf] & eeprom_asf) && !(nic->eeprom[eeprom_config_asf] & eeprom_gcl) && - ((nic->eeprom[eeprom_smbus_addr] &0xFF ) !=0xFE )); + ((nic->eeprom[eeprom_smbus_addr] &0xFF ) !=0xFE ); }static int e100_up (struct nic *nic)
drivers/net/e1000/e1000_main.c +1 -1
@@ -3557,7 +3557,7 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter, adapter->total_tx_packets += total_tx_packets; netdev->stats.tx_bytes += total_tx_bytes; netdev->stats.tx_packets += total_tx_packets; -return (count < tx_ring->count); +return count < tx_ring->count; }/**
drivers/net/e1000e/ethtool.c +2 -2
@@ -368,7 +368,7 @@ out:static u32 e1000_get_rx_csum (struct net_device *netdev) {struct e1000_adapter *adapter =netdev_priv (netdev); -return (adapter->flags &FLAG_RX_CSUM_ENABLED ); +return adapter->flags &FLAG_RX_CSUM_ENABLED ; }static int e1000_set_rx_csum (struct net_device *netdev,u32 data)
@@ -389,7 +389,7 @@ static int e1000_set_rx_csum(struct net_device *netdev, u32 data)static u32 e1000_get_tx_csum (struct net_device *netdev) { -return ((netdev->features &NETIF_F_HW_CSUM ) !=0 ); +return (netdev->features &NETIF_F_HW_CSUM ) !=0 ; }static int e1000_set_tx_csum (struct net_device *netdev,u32 data)
drivers/net/e1000e/netdev.c +1 -1
@@ -1053,7 +1053,7 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter) adapter->total_tx_packets += total_tx_packets; netdev->stats.tx_bytes += total_tx_bytes; netdev->stats.tx_packets += total_tx_packets; -return (count < tx_ring->count); +return count < tx_ring->count; }/**
drivers/net/enic/vnic_rq.h +1 -1
@@ -143,7 +143,7 @@ static inline void vnic_rq_post(struct vnic_rq *rq,static inline int vnic_rq_posting_soon (struct vnic_rq *rq) { -return ((rq->to_use->index &VNIC_RQ_RETURN_RATE ) ==0 ); +return (rq->to_use->index &VNIC_RQ_RETURN_RATE ) ==0 ; }static inline void vnic_rq_return_descs (struct vnic_rq *rq,unsigned int count)
drivers/net/eth16i.c +6 -6
@@ -796,7 +796,7 @@ static int eth16i_receive_probe_packet(int ioaddr)if (eth16i_debug >1 )printk (KERN_DEBUG "RECEIVE_PACKET\n" ); -return (0 );/* Found receive packet */ +return 0 ;/* Found receive packet */ } }
@@ -805,7 +805,7 @@ static int eth16i_receive_probe_packet(int ioaddr)printk (KERN_DEBUG "RX_STATUS_REG = %x\n" ,inb (ioaddr +RX_STATUS_REG )); } -return (0 );/* Return success */ +return 0 ;/* Return success */ }#if 0
@@ -841,7 +841,7 @@ static int __init eth16i_get_irq(int ioaddr)if ( ioaddr <0x1000 ) { cbyte =inb (ioaddr +JUMPERLESS_CONFIG ); -return ( eth16i_irqmap[ ((cbyte &0xC0 ) >>6 ) ] ); +return eth16i_irqmap[((cbyte &0xC0 ) >>6 )]; }else {/* Oh..the card is EISA so method getting IRQ different */ unsigned short index =0 ; cbyte =inb (ioaddr +EISA_IRQ_REG );
@@ -849,7 +849,7 @@ static int __init eth16i_get_irq(int ioaddr) cbyte = cbyte >>1 ; index++; } -return ( eth32i_irqmap[ index ] ); +return eth32i_irqmap[index]; } }
@@ -909,7 +909,7 @@ static int eth16i_read_eeprom(int ioaddr, int offset) data =eth16i_read_eeprom_word (ioaddr);outb (CS_0 |SK_0 , ioaddr +EEPROM_CTRL_REG ); -return (data); +return data; }static int eth16i_read_eeprom_word (int ioaddr)
@@ -928,7 +928,7 @@ static int eth16i_read_eeprom_word(int ioaddr)eeprom_slow_io (); } -return (data); +return data; }static void eth16i_eeprom_cmd (int ioaddr,unsigned char command)
drivers/net/forcedeth.c +1 -1
@@ -4620,7 +4620,7 @@ static int nv_set_pauseparam(struct net_device *dev, struct ethtool_pauseparam*static u32 nv_get_rx_csum (struct net_device *dev) {struct fe_priv *np =netdev_priv (dev); -return (np->rx_csum) !=0 ; +return np->rx_csum !=0 ; }static int nv_set_rx_csum (struct net_device *dev,u32 data)
drivers/net/fsl_pq_mdio.c +2 -2
@@ -125,7 +125,7 @@ int fsl_pq_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value)struct fsl_pq_mdio __iomem *regs =fsl_pq_mdio_get_regs (bus);/* Write to the local MII regs */ -return (fsl_pq_local_mdio_write (regs, mii_id, regnum, value)); +return fsl_pq_local_mdio_write (regs, mii_id, regnum, value); }/*
@@ -137,7 +137,7 @@ int fsl_pq_mdio_read(struct mii_bus *bus, int mii_id, int regnum)struct fsl_pq_mdio __iomem *regs =fsl_pq_mdio_get_regs (bus);/* Read the local MII regs */ -return (fsl_pq_local_mdio_read (regs, mii_id, regnum)); +return fsl_pq_local_mdio_read (regs, mii_id, regnum); }/* Reset the MIIM registers, and wait for the bus to free */
drivers/net/gianfar_ethtool.c +2 -2
@@ -254,7 +254,7 @@ static unsigned int gfar_usecs2ticks(struct gfar_private *priv, unsigned int use/* Make sure we return a number greater than 0 * if usecs > 0 */ -return ((usecs *1000 + count -1 ) / count); +return (usecs *1000 + count -1 ) / count; }/* Convert ethernet clock ticks to microseconds */
@@ -278,7 +278,7 @@ static unsigned int gfar_ticks2usecs(struct gfar_private *priv, unsigned int tic/* Make sure we return a number greater than 0 */ /* if ticks is > 0 */ -return ((ticks * count) /1000 ); +return (ticks * count) /1000 ; }/* Get the coalescing parameters, and put them in the cvals
drivers/net/hamradio/bpqether.c +1 -1
@@ -168,7 +168,7 @@ static inline struct net_device *bpq_get_ax25_dev(struct net_device *dev)static inline int dev_is_ethdev (struct net_device *dev) { -return (dev->type ==ARPHRD_ETHER &&strncmp (dev->name,"dummy" ,5 )); +return dev->type ==ARPHRD_ETHER &&strncmp (dev->name,"dummy" ,5 ); }/* ------------------------------------------------------------------------ */
drivers/net/hamradio/hdlcdrv.c +1 -1
@@ -110,7 +110,7 @@ static int calc_crc_ccitt(const unsigned char *buf, int cnt)for (; cnt >0 ; cnt--) crc = (crc >>8 ) ^ crc_ccitt_table[(crc ^ *buf++) &0xff ]; crc ^=0xffff ; - return (crc & 0xffff); + return crc & 0xffff; }#endif
drivers/net/hp100.c +3 -3
@@ -1312,7 +1312,7 @@ static int hp100_build_rx_pdl(hp100_ring_t * ringptr,for (p = (ringptr->pdl); p < (ringptr->pdl +5 ); p++)printk ("hp100: %s: Adr 0x%.8x = 0x%.8x\n" , dev->name, (u_int ) p, (u_int) * p);#endif -return (1 ); +return 1 ; }/* else: */ /* alloc_skb failed (no memory) -> still can receive the header
@@ -1325,7 +1325,7 @@ static int hp100_build_rx_pdl(hp100_ring_t * ringptr, ringptr->pdl[0 ] =0x00010000 ;/* PDH: Count=1 Fragment */ -return (0 ); +return 0 ; }/*
@@ -2752,7 +2752,7 @@ static int hp100_login_to_vg_hub(struct net_device *dev, u_short force_relogin)hp100_outw (HP100_MISC_ERROR ,IRQ_STATUS );if (val &HP100_LINK_UP_ST ) -return (0 );/* login was ok */ +return 0 ;/* login was ok */ else {printk ("hp100: %s: Training failed.\n" , dev->name);hp100_down_vg_link (dev);
drivers/net/ibm_newemac/core.c +3 -3
@@ -2095,11 +2095,11 @@ static void *emac_dump_regs(struct emac_instance *dev, void *buf)if (emac_has_feature (dev,EMAC_FTR_EMAC4 )) { hdr->version =EMAC4_ETHTOOL_REGS_VER ;memcpy_fromio (hdr +1 , dev->emacp,EMAC4_ETHTOOL_REGS_SIZE (dev)); -return ((void *)(hdr +1 ) +EMAC4_ETHTOOL_REGS_SIZE (dev)); +return (void *)(hdr +1 ) +EMAC4_ETHTOOL_REGS_SIZE (dev); }else { hdr->version =EMAC_ETHTOOL_REGS_VER ;memcpy_fromio (hdr +1 , dev->emacp,EMAC_ETHTOOL_REGS_SIZE (dev)); -return ((void *)(hdr +1 ) +EMAC_ETHTOOL_REGS_SIZE (dev)); +return (void *)(hdr +1 ) +EMAC_ETHTOOL_REGS_SIZE (dev); } }
@@ -2293,7 +2293,7 @@ static int __devinit emac_check_deps(struct emac_instance *dev,if (deps[i].drvdata !=NULL ) there++; } -return (there ==EMAC_DEP_COUNT ); +return there ==EMAC_DEP_COUNT ; }static void emac_put_deps (struct emac_instance *dev)
drivers/net/ibm_newemac/core.h +3 -3
@@ -410,7 +410,7 @@ static inline u32 *emac_xaht_base(struct emac_instance *dev)else offset = offsetof(struct emac_regs, u0.emac4.iaht1); -return ((u32 *)((ptrdiff_t )p + offset)); +return (u32 *)((ptrdiff_t )p + offset); }static inline u32 *emac_gaht_base (struct emac_instance *dev)
@@ -418,7 +418,7 @@ static inline u32 *emac_gaht_base(struct emac_instance *dev)/* GAHT registers always come after an identical number of * IAHT registers. */ -return (emac_xaht_base (dev) +EMAC_XAHT_REGS (dev)); +return emac_xaht_base (dev) +EMAC_XAHT_REGS (dev); }static inline u32 *emac_iaht_base (struct emac_instance *dev)
@@ -426,7 +426,7 @@ static inline u32 *emac_iaht_base(struct emac_instance *dev)/* IAHT registers always come before an identical number of * GAHT registers. */ -return (emac_xaht_base (dev)); +return emac_xaht_base (dev); }/* Ethtool get_regs complex data.
drivers/net/igb/igb_main.c +1 -1
@@ -5430,7 +5430,7 @@ static bool igb_clean_tx_irq(struct igb_q_vector *q_vector) tx_ring->total_packets += total_packets; tx_ring->tx_stats.bytes += total_bytes; tx_ring->tx_stats.packets += total_packets; -return (count < tx_ring->count); +return count < tx_ring->count; }/**
drivers/net/igbvf/ethtool.c +1 -1
@@ -153,7 +153,7 @@ static int igbvf_set_rx_csum(struct net_device *netdev, u32 data)static u32 igbvf_get_tx_csum (struct net_device *netdev) { -return ((netdev->features &NETIF_F_IP_CSUM ) !=0 ); +return (netdev->features &NETIF_F_IP_CSUM ) !=0 ; }static int igbvf_set_tx_csum (struct net_device *netdev,u32 data)
drivers/net/igbvf/netdev.c +1 -1
@@ -845,7 +845,7 @@ static bool igbvf_clean_tx_irq(struct igbvf_ring *tx_ring) } adapter->net_stats.tx_bytes += total_bytes; adapter->net_stats.tx_packets += total_packets; -return (count < tx_ring->count); +return count < tx_ring->count; }static irqreturn_t igbvf_msix_other (int irq,void *data)
drivers/net/irda/donauboe.c +2 -2
@@ -217,7 +217,7 @@ toshoboe_checkfcs (unsigned char *buf, int len)for (i =0 ; i < len; ++i) fcs.value =irda_fcs (fcs.value, *(buf++)); -return (fcs.value ==GOOD_FCS ); +return fcs.value ==GOOD_FCS ; }/***********************************************************************/
@@ -759,7 +759,7 @@ toshoboe_maketestpacket (unsigned char *buf, int badcrc, int fir)if (fir) {memset (buf,0 ,TT_LEN ); -return (TT_LEN ); +return TT_LEN ; } fcs.value =INIT_FCS ;
drivers/net/irda/irda-usb.c +1 -1
@@ -1514,7 +1514,7 @@ static inline int irda_usb_parse_endpoints(struct irda_usb_cb *self, struct usb_IRDA_DEBUG (0 ,"%s(), And our endpoints are : in=%02X, out=%02X (%d), int=%02X\n" , __func__, self->bulk_in_ep, self->bulk_out_ep, self->bulk_out_mtu, self->bulk_int_ep); -return ((self->bulk_in_ep !=0 ) && (self->bulk_out_ep !=0 )); +return (self->bulk_in_ep !=0 ) && (self->bulk_out_ep !=0 ); }#ifdef IU_DUMP_CLASS_DESC
drivers/net/irda/nsc-ircc.c +1 -1
@@ -1348,7 +1348,7 @@ static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 speed)outb (bank, iobase+BSR );/* Make sure interrupt handlers keep the proper interrupt mask */ -return (ier); +return ier; }/*
drivers/net/irda/sir_dev.c +1 -1
@@ -336,7 +336,7 @@ static int sirdev_is_receiving(struct sir_dev *dev)if (!atomic_read (&dev->enable_rx))return 0 ; -return (dev->rx_buff.state !=OUTSIDE_FRAME ); +return dev->rx_buff.state !=OUTSIDE_FRAME ; }int sirdev_set_dongle (struct sir_dev *dev,IRDA_DONGLE type)
drivers/net/irda/smsc-ircc2.c +1 -1
@@ -2051,7 +2051,7 @@ static int smsc_ircc_sir_write(int iobase, int fifo_size, __u8 *buf, int len)*/ static int smsc_ircc_is_receiving (struct smsc_ircc_cb *self) { -return (self->rx_buff.state !=OUTSIDE_FRAME ); +return self->rx_buff.state !=OUTSIDE_FRAME ; }
drivers/net/irda/stir4200.c +1 -1
@@ -219,7 +219,7 @@ static inline int read_reg(struct stir_cb *stir, __u16 reg,static inline int isfir (u32 speed) { -return (speed ==4000000 ); +return speed ==4000000 ; }/*
drivers/net/irda/via-ircc.h +1 -1
@@ -238,7 +238,7 @@ static void WriteLPCReg(int iRegNum, unsigned char iVal)static __u8 ReadReg (unsigned int BaseAddr,int iRegNum) { -return ((__u8 )inb (BaseAddr + iRegNum)); +return (__u8 )inb (BaseAddr + iRegNum); }static void WriteReg (unsigned int BaseAddr,int iRegNum,unsigned char iVal)
drivers/net/irda/vlsi_ir.h +1 -1
@@ -595,7 +595,7 @@ struct ring_descr {static inline int rd_is_active (struct ring_descr *rd) { -return ((rd->hw->rd_status &RD_ACTIVE ) !=0 ); +return (rd->hw->rd_status &RD_ACTIVE ) !=0 ; }static inline void rd_activate (struct ring_descr *rd)
drivers/net/ixgb/ixgb_ee.c +16 -16
@@ -296,12 +296,12 @@ ixgb_wait_eeprom_command(struct ixgb_hw *hw) eecd_reg =IXGB_READ_REG (hw,EECD );if (eecd_reg &IXGB_EECD_DO ) -return (true); +return true;udelay (50 ); }ASSERT (0 ); -return (false); +return false; }/******************************************************************************
@@ -327,9 +327,9 @@ ixgb_validate_eeprom_checksum(struct ixgb_hw *hw) checksum +=ixgb_read_eeprom (hw, i);if (checksum == (u16 )EEPROM_SUM ) -return (true); +return true;else -return (false); +return false; }/******************************************************************************
@@ -439,7 +439,7 @@ ixgb_read_eeprom(struct ixgb_hw *hw,/* End this read operation */ ixgb_standby_eeprom (hw); -return (data); +return data; }/******************************************************************************
@@ -476,16 +476,16 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw)/* clear the init_ctrl_reg_1 to signify that the cache is * invalidated */ ee_map->init_ctrl_reg_1 =cpu_to_le16 (EEPROM_ICW1_SIGNATURE_CLEAR ); -return (false); +return false; }if ((ee_map->init_ctrl_reg_1 &cpu_to_le16 (EEPROM_ICW1_SIGNATURE_MASK )) !=cpu_to_le16 (EEPROM_ICW1_SIGNATURE_VALID )) {pr_debug ("Signature invalid\n" ); -return (false); +return false; } -return (true); +return true; }/******************************************************************************
@@ -505,7 +505,7 @@ ixgb_check_and_get_eeprom_data (struct ixgb_hw* hw)if ((ee_map->init_ctrl_reg_1 &cpu_to_le16 (EEPROM_ICW1_SIGNATURE_MASK )) ==cpu_to_le16 (EEPROM_ICW1_SIGNATURE_VALID )) { -return (true); +return true; }else {return ixgb_get_eeprom_data (hw); }
@@ -526,10 +526,10 @@ ixgb_get_eeprom_word(struct ixgb_hw *hw, u16 index)if ((index <IXGB_EEPROM_SIZE ) && (ixgb_check_and_get_eeprom_data (hw) == true)) { -return (hw->eeprom[index]); +return hw->eeprom[index]; } -return (0 ); +return 0 ; }/******************************************************************************
@@ -570,10 +570,10 @@ u32 ixgb_get_ee_pba_number(struct ixgb_hw *hw) {if (ixgb_check_and_get_eeprom_data (hw) == true) -return (le16_to_cpu (hw->eeprom[EEPROM_PBA_1_2_REG ]) - | (le16_to_cpu (hw->eeprom[EEPROM_PBA_3_4_REG ])<<16 )); +return le16_to_cpu (hw->eeprom[EEPROM_PBA_1_2_REG ]) + | (le16_to_cpu (hw->eeprom[EEPROM_PBA_3_4_REG ])<<16 ); -return (0 ); +return 0 ; }
@@ -591,8 +591,8 @@ ixgb_get_ee_device_id(struct ixgb_hw *hw)struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom;if (ixgb_check_and_get_eeprom_data (hw) == true) -return (le16_to_cpu (ee_map->device_id)); +return le16_to_cpu (ee_map->device_id); -return (0 ); +return 0 ; }
drivers/net/ixgb/ixgb_ethtool.c +1 -1
@@ -410,7 +410,7 @@ static int ixgb_get_eeprom_len(struct net_device *netdev) {/* return size in bytes */ -return (IXGB_EEPROM_SIZE <<1 ); +return IXGB_EEPROM_SIZE <<1 ; } static int
drivers/net/ixgb/ixgb_hw.c +7 -7
@@ -167,7 +167,7 @@ ixgb_adapter_stop(struct ixgb_hw *hw)/* Clear any pending interrupt events. */ icr_reg =IXGB_READ_REG (hw,ICR ); -return (ctrl_reg &IXGB_CTRL0_RST ); +return ctrl_reg &IXGB_CTRL0_RST ; }
@@ -209,7 +209,7 @@ ixgb_identify_xpak_vendor(struct ixgb_hw *hw) xpak_vendor = ixgb_xpak_vendor_infineon; } -return (xpak_vendor); +return xpak_vendor; }/******************************************************************************
@@ -273,7 +273,7 @@ ixgb_identify_phy(struct ixgb_hw *hw)if (hw->subsystem_vendor_id ==SUN_SUBVENDOR_ID ) phy_type = ixgb_phy_type_bcm; -return (phy_type); +return phy_type; }/******************************************************************************
@@ -366,7 +366,7 @@ ixgb_init_hw(struct ixgb_hw *hw)/* 82597EX errata: Call check-for-link in case lane deskew is locked */ ixgb_check_for_link (hw); -return (status); +return status; }/******************************************************************************
@@ -531,7 +531,7 @@ ixgb_hash_mc_addr(struct ixgb_hw *hw, } hash_value &=0xFFF ; -return (hash_value); +return hash_value; }/******************************************************************************
@@ -715,7 +715,7 @@ ixgb_setup_fc(struct ixgb_hw *hw) }IXGB_WRITE_REG (hw,FCRTH , hw->fc.high_water); } -return (status); +return status; }/******************************************************************************
@@ -1140,7 +1140,7 @@ mac_addr_valid(u8 *mac_addr)pr_debug ("MAC address is all zeros\n" ); is_valid = false; } -return (is_valid); +return is_valid; }/******************************************************************************
drivers/net/ixgbe/ixgbe_ethtool.c +3 -3
@@ -401,7 +401,7 @@ static int ixgbe_set_pauseparam(struct net_device *netdev,static u32 ixgbe_get_rx_csum (struct net_device *netdev) {struct ixgbe_adapter *adapter =netdev_priv (netdev); -return (adapter->flags &IXGBE_FLAG_RX_CSUM_ENABLED ); +return adapter->flags &IXGBE_FLAG_RX_CSUM_ENABLED ; }static int ixgbe_set_rx_csum (struct net_device *netdev,u32 data)
@@ -988,8 +988,8 @@ static int ixgbe_get_sset_count(struct net_device *netdev, int sset)case ETH_SS_STATS :return IXGBE_STATS_LEN ;case ETH_SS_NTUPLE_FILTERS : -return (ETHTOOL_MAX_NTUPLE_LIST_ENTRY * -ETHTOOL_MAX_NTUPLE_STRING_PER_ENTRY ); +return ETHTOOL_MAX_NTUPLE_LIST_ENTRY * +ETHTOOL_MAX_NTUPLE_STRING_PER_ENTRY ;default :return -EOPNOTSUPP ; }
drivers/net/ixgbe/ixgbe_main.c +1 -1
@@ -826,7 +826,7 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector, tx_ring->total_packets += total_packets; tx_ring->stats.packets += total_packets; tx_ring->stats.bytes += total_bytes; -return (count < tx_ring->work_limit); +return count < tx_ring->work_limit; }#ifdef CONFIG_IXGBE_DCA
drivers/net/ixgbevf/ixgbevf_main.c +1 -1
@@ -311,7 +311,7 @@ static bool ixgbevf_clean_tx_irq(struct ixgbevf_adapter *adapter, netdev->stats.tx_bytes += total_bytes; netdev->stats.tx_packets += total_packets; -return (count < tx_ring->work_limit); +return count < tx_ring->work_limit; }/**
drivers/net/ll_temac_main.c +1 -1
@@ -494,7 +494,7 @@ static u32 temac_setoptions(struct net_device *ndev, u32 options) lp->options |= options;mutex_unlock (&lp->indirect_mutex); -return (0 ); +return 0 ; }/* Initialize temac */
drivers/net/lp486e.c +1 -1
@@ -460,7 +460,7 @@ init_rx_bufs(struct net_device *dev, int num) { } lp->rbd_tail->next = rfd->rbd;#endif -return (i); +return i; } static inline void
drivers/net/meth.c +1 -1
@@ -461,7 +461,7 @@ static int meth_tx_full(struct net_device *dev) {struct meth_private *priv =netdev_priv (dev); -return (priv->tx_count >=TX_RING_ENTRIES -1 ); +return priv->tx_count >=TX_RING_ENTRIES -1 ; }static void meth_tx_cleanup (struct net_device * dev,unsigned long int_status)
drivers/net/mlx4/en_selftest.c +1 -1
@@ -107,7 +107,7 @@ static int mlx4_en_test_loopback(struct mlx4_en_priv *priv) mlx4_en_test_loopback_exit: priv->validate_loopback =0 ; -return (!loopback_ok); +return !loopback_ok; }
drivers/net/myri10ge/myri10ge.c +3 -3
@@ -1555,12 +1555,12 @@ static irqreturn_t myri10ge_intr(int irq, void *arg)* valid since MSI-X irqs are not shared */ if ((mgp->dev->real_num_tx_queues ==1 ) && (ss != mgp->ss)) {napi_schedule (&ss->napi); -return (IRQ_HANDLED ); +return IRQ_HANDLED ; }/* make sure it is our IRQ, and that the DMA has finished */ if (unlikely (!stats->valid)) -return (IRQ_NONE ); +return IRQ_NONE ;/* low bit indicates receives are present, so schedule * napi poll handler */
@@ -1599,7 +1599,7 @@ static irqreturn_t myri10ge_intr(int irq, void *arg)myri10ge_check_statblock (mgp);put_be32 (htonl (3 ), ss->irq_claim +1 ); -return (IRQ_HANDLED ); +return IRQ_HANDLED ; } static int
drivers/net/myri_sbus.c +1 -1
@@ -735,7 +735,7 @@ static int myri_header(struct sk_buff *skb, struct net_device *dev,int i;for (i =0 ; i < dev->addr_len; i++) eth->h_dest[i] =0 ; -return (dev->hard_header_len); +return dev->hard_header_len; }if (daddr) {
drivers/net/netxen/netxen_nic_init.c +2 -2
@@ -346,7 +346,7 @@ static u32 netxen_decode_crb_addr(u32 addr)if (pci_base ==NETXEN_ADDR_ERROR )return pci_base;else -return (pci_base + offset); +return pci_base + offset; }#define NETXEN_MAX_ROM_WAIT_USEC 100
@@ -1792,7 +1792,7 @@ int netxen_process_cmd_ring(struct netxen_adapter *adapter) done = (sw_consumer == hw_consumer);spin_unlock (&adapter->tx_clean_lock); -return (done); +return done; }void
drivers/net/netxen/netxen_nic_main.c +1 -1
@@ -177,7 +177,7 @@ netxen_alloc_sds_rings(struct netxen_recv_context *recv_ctx, int count) recv_ctx->sds_rings =kzalloc (size,GFP_KERNEL ); -return (recv_ctx->sds_rings ==NULL ); +return recv_ctx->sds_rings ==NULL ; } static void
drivers/net/niu.c +6 -7
@@ -283,7 +283,7 @@ static int niu_enable_interrupts(struct niu *np, int on)static u32 phy_encode (u32 type,int port) { -return (type << (port *2 )); +return type << (port *2 ); }static u32 phy_decode (u32 val,int port)
@@ -3043,8 +3043,7 @@ static int tcam_flush_all(struct niu *np)static u64 hash_addr_regval (unsigned long index,unsigned long num_entries) { -return ((u64 )index | (num_entries ==1 ? -HASH_TBL_ADDR_AUTOINC :0 )); +return (u64 )index | (num_entries ==1 ?HASH_TBL_ADDR_AUTOINC :0 ); }#if 0
@@ -3276,7 +3275,7 @@ static u16 tcam_get_index(struct niu *np, u16 idx)/* One entry reserved for IP fragment rule */ if (idx >= (np->clas.tcam_sz -1 )) idx =0 ; -return (np->clas.tcam_top + ((idx+1 ) * np->parent->num_ports)); +return np->clas.tcam_top + ((idx+1 ) * np->parent->num_ports); }static u16 tcam_get_size (struct niu *np)
@@ -3313,7 +3312,7 @@ static unsigned int niu_hash_rxaddr(struct rx_ring_info *rp, u64 a) a >>=PAGE_SHIFT ; a ^= (a >>ilog2 (MAX_RBR_RING_SIZE )); -return (a & (MAX_RBR_RING_SIZE -1 )); +return a & (MAX_RBR_RING_SIZE -1 ); } static struct page *niu_find_rxpage(struct rx_ring_info *rp, u64 addr,
@@ -7796,11 +7795,11 @@ static int niu_get_sset_count(struct net_device *dev, int stringset)if (stringset !=ETH_SS_STATS )return -EINVAL ; -return ((np->flags &NIU_FLAGS_XMAC ? +return (np->flags &NIU_FLAGS_XMAC ?NUM_XMAC_STAT_KEYS :NUM_BMAC_STAT_KEYS ) + (np->num_rx_rings *NUM_RXCHAN_STAT_KEYS ) + - (np->num_tx_rings *NUM_TXCHAN_STAT_KEYS )); + (np->num_tx_rings *NUM_TXCHAN_STAT_KEYS ); } static void niu_get_ethtool_stats(struct net_device *dev,
drivers/net/pcmcia/nmclan_cs.c +1 -1
@@ -521,7 +521,7 @@ static int mace_read(mace_private *lp, unsigned int ioaddr, int reg)spin_unlock_irqrestore (&lp->bank_lock, flags);break ; } -return (data &0xFF ); +return data &0xFF ; }/* mace_read */ /* ----------------------------------------------------------------------------
drivers/net/pcmcia/smc91c92_cs.c +1 -1
@@ -815,7 +815,7 @@ static int check_sig(struct pcmcia_device *link) ((s >> 8) != (s & 0xff))) {SMC_SELECT_BANK (3 ); s =inw (ioaddr +REVISION ); -return (s &0xff ); +return s &0xff ; }if (width) {
drivers/net/pcnet32.c +2 -2
@@ -376,7 +376,7 @@ static void pcnet32_wio_reset(unsigned long addr)static int pcnet32_wio_check (unsigned long addr) {outw (88 , addr +PCNET32_WIO_RAP ); -return (inw (addr +PCNET32_WIO_RAP ) ==88 ); +return inw (addr +PCNET32_WIO_RAP ) ==88 ; }static struct pcnet32_access pcnet32_wio = {
@@ -431,7 +431,7 @@ static void pcnet32_dwio_reset(unsigned long addr)static int pcnet32_dwio_check (unsigned long addr) {outl (88 , addr +PCNET32_DWIO_RAP ); -return ((inl (addr +PCNET32_DWIO_RAP ) &0xffff ) ==88 ); +return (inl (addr +PCNET32_DWIO_RAP ) &0xffff ) ==88 ; }static struct pcnet32_access pcnet32_dwio = {
drivers/net/ps3_gelic_wireless.c +3 -3
@@ -85,12 +85,12 @@ static const int bitrate_list[] = {*/ static inline int wpa2_capable (void ) { -return (0 <=ps3_compare_firmware_version (2 ,0 ,0 )); +return 0 <=ps3_compare_firmware_version (2 ,0 ,0 ); }static inline int precise_ie (void ) { -return (0 <=ps3_compare_firmware_version (2 ,2 ,0 )); +return 0 <=ps3_compare_firmware_version (2 ,2 ,0 ); }/* * post_eurus_cmd helpers
@@ -506,7 +506,7 @@ static size_t gelic_wl_synthesize_ie(u8 *buf, start[1 ] = (buf - start -2 );pr_debug ("%s: ->\n" , __func__); -return (buf - start); +return buf - start; }struct ie_item {
drivers/net/qlcnic/qlcnic_main.c +1 -1
@@ -172,7 +172,7 @@ qlcnic_alloc_sds_rings(struct qlcnic_recv_context *recv_ctx, int count) recv_ctx->sds_rings =kzalloc (size,GFP_KERNEL ); -return (recv_ctx->sds_rings ==NULL ); +return recv_ctx->sds_rings ==NULL ; } static void
drivers/net/sfc/net_driver.h +1 -1
@@ -987,7 +987,7 @@ static inline int efx_rx_queue_index(struct efx_rx_queue *rx_queue)static inline struct efx_rx_buffer *efx_rx_buffer (struct efx_rx_queue *rx_queue,unsigned int index) { -return (&rx_queue->buffer[index]); +return &rx_queue->buffer[index]; }/* Set bit in a little-endian bitfield */
drivers/net/sfc/nic.c +5 -5
@@ -104,7 +104,7 @@ static inline void efx_write_buf_tbl(struct efx_nic *efx, efx_qword_t *value,static inline efx_qword_t *efx_event (struct efx_channel *channel,unsigned int index) { -return (((efx_qword_t *) (channel->eventq.addr)) + index); +return ((efx_qword_t *) (channel->eventq.addr)) + index; }/* See if an event is present
@@ -119,8 +119,8 @@ static inline efx_qword_t *efx_event(struct efx_channel *channel,*/ static inline int efx_event_present (efx_qword_t *event) { -return (!(EFX_DWORD_IS_ALL_ONES (event->dword[0 ]) | -EFX_DWORD_IS_ALL_ONES (event->dword[1 ]))); +return !(EFX_DWORD_IS_ALL_ONES (event->dword[0 ]) | +EFX_DWORD_IS_ALL_ONES (event->dword[1 ])); } static bool efx_masked_compare_oword(const efx_oword_t *a, const efx_oword_t *b,
@@ -347,7 +347,7 @@ void efx_nic_free_buffer(struct efx_nic *efx, struct efx_buffer *buffer)static inline efx_qword_t *efx_tx_desc (struct efx_tx_queue *tx_queue,unsigned int index) { -return (((efx_qword_t *) (tx_queue->txd.addr)) + index); +return ((efx_qword_t *) (tx_queue->txd.addr)) + index; }/* This writes to the TX_DESC_WPTR; write pointer for TX descriptor ring */
@@ -502,7 +502,7 @@ void efx_nic_remove_tx(struct efx_tx_queue *tx_queue)static inline efx_qword_t *efx_rx_desc (struct efx_rx_queue *rx_queue,unsigned int index) { -return (((efx_qword_t *) (rx_queue->rxd.addr)) + index); +return ((efx_qword_t *) (rx_queue->rxd.addr)) + index; }/* This creates an entry in the RX descriptor queue */
drivers/net/sis900.c +3 -3
@@ -832,7 +832,7 @@ static u16 __devinit read_eeprom(long ioaddr, int location)outl (0 , ee_addr);eeprom_delay (); -return (retval); +return retval; }/* Read and write the MII management registers using software-generated
@@ -2247,9 +2247,9 @@ static inline u16 sis900_mcast_bitnr(u8 *addr, u8 revision)/* leave 8 or 7 most siginifant bits */ if ((revision >=SIS635A_900_REV ) || (revision ==SIS900B_900_REV )) -return ((int )(crc >>24 )); +return (int )(crc >>24 );else -return ((int )(crc >>25 )); +return (int )(crc >>25 ); }/**
drivers/net/skfp/cfm.c +5 -5
@@ -542,8 +542,8 @@ static void cfm_fsm(struct s_smc *smc, int cmd)*/ int cfm_get_mac_input (struct s_smc *smc) { -return ((smc->mib.fddiSMTCF_State ==SC10_C_WRAP_B || - smc->mib.fddiSMTCF_State ==SC5_THRU_B ) ?PB :PA ) ; +return (smc->mib.fddiSMTCF_State ==SC10_C_WRAP_B || + smc->mib.fddiSMTCF_State ==SC5_THRU_B ) ?PB :PA ; }/*
@@ -553,8 +553,8 @@ int cfm_get_mac_input(struct s_smc *smc)*/ int cfm_get_mac_output (struct s_smc *smc) { -return ((smc->mib.fddiSMTCF_State ==SC10_C_WRAP_B || - smc->mib.fddiSMTCF_State ==SC4_THRU_A ) ?PB :PA ) ; +return (smc->mib.fddiSMTCF_State ==SC10_C_WRAP_B || + smc->mib.fddiSMTCF_State ==SC4_THRU_A ) ?PB :PA ; }static char path_iso[] = {
@@ -623,5 +623,5 @@ int cem_build_path(struct s_smc *smc, char *to, int path_index)LINT_USE (path_index); -return (len) ; +return len; }
drivers/net/skfp/drvfbi.c +8 -8
@@ -267,7 +267,7 @@ void timer_irq(struct s_smc *smc)int pcm_get_s_port (struct s_smc *smc) {SK_UNUSED (smc) ; -return (PS ) ; +return PS ; }/*
@@ -366,7 +366,7 @@ void sm_pm_bypass_req(struct s_smc *smc, int mode)*/ int sm_pm_bypass_present (struct s_smc *smc) { -return ( (inp (ADDR (B0_DAS )) &DAS_BYP_ST ) ? TRUE: FALSE) ; +return (inp (ADDR (B0_DAS )) &DAS_BYP_ST ) ? TRUE : FALSE; }void plc_clear_irq (struct s_smc *smc,int p)
@@ -483,9 +483,9 @@ static int is_equal_num(char comp1[], char comp2[], int num)for (i =0 ; i < num ; i++) {if (comp1[i] != comp2[i]) -return (0 ) ; +return 0 ; } -return (1 ) ; +return 1 ; }/* is_equal_num */
@@ -522,18 +522,18 @@ int set_oi_id_def(struct s_smc *smc) i++ ;break ;/* entry ok */ default : - return (1) ; /* invalid oi_status */ + return 1; /* invalid oi_status */ } }if (i ==0 ) -return (2 ) ; +return 2 ;if (!act_entries) -return (3 ) ; +return 3 ;/* ok, we have a valid OEM data base with an active entry */ smc->hw.oem_id = (struct s_oem_ids *) &oem_ids[sel_id] ; -return (0 ) ; +return 0 ; }#endif /* MULT_OEM */
drivers/net/skfp/ess.c +23 -23
174 lines not on this page · raw message
drivers/net/skfp/fplustm.c +12 -12
@@ -112,8 +112,8 @@ static u_long mac_get_tneg(struct s_smc *smc)u_long tneg ; tneg = (u_long)((long )inpw (FM_A (FM_TNEG ))<<5 ) ; -return ((u_long)((tneg + ((inpw (FM_A (FM_TMRS ))>>10 )&0x1f )) | -0xffe00000L )) ; +return (u_long)((tneg + ((inpw (FM_A (FM_TMRS ))>>10 )&0x1f )) | +0xffe00000L ) ; }void mac_update_counter (struct s_smc *smc)
@@ -163,7 +163,7 @@ static u_long read_mdr(struct s_smc *smc, unsigned int addr)/* is used */ p = (u_long )inpw (FM_A (FM_MDRU ))<<16 ; p += (u_long )inpw (FM_A (FM_MDRL )) ; - return(p) ; + return p; }#endif
@@ -887,7 +887,7 @@ int init_fplus(struct s_smc *smc)/* make sure all PCI settings are correct */ mac_do_pci_fix (smc) ; -return (init_mac (smc,1 )) ; +return init_mac (smc,1 );/* enable_formac(smc) ; */ }
@@ -989,7 +989,7 @@ static int init_mac(struct s_smc *smc, int all) } smc->hw.hw_state =STARTED ; -return (0 ) ; +return 0 ; }
@@ -1049,7 +1049,7 @@ void sm_ma_control(struct s_smc *smc, int mode)int sm_mac_get_tx_state (struct s_smc *smc) { -return ((inpw (FM_A (FM_STMCHN ))>>4 )&7 ) ; +return (inpw (FM_A (FM_STMCHN ))>>4 ) &7 ; }/*
@@ -1084,9 +1084,9 @@ static struct s_fpmc* mac_get_mc_table(struct s_smc *smc, }if (memcmp ((char *)&tb->a,(char *)own,6 ))continue ; -return (tb) ; +return tb; } -return (slot) ;/* return first free or NULL */ +return slot;/* return first free or NULL */ }/*
@@ -1152,12 +1152,12 @@ int mac_add_multicast(struct s_smc *smc, struct fddi_addr *addr, int can)*/ if (can &0x80 ) {if (smc->hw.fp.smt_slots_used >=SMT_MAX_MULTI ) { -return (1 ) ; +return 1 ; } }else {if (smc->hw.fp.os_slots_used >=FPMAX_MULTICAST -SMT_MAX_MULTI ) { -return (1 ) ; +return 1 ; } }
@@ -1165,7 +1165,7 @@ int mac_add_multicast(struct s_smc *smc, struct fddi_addr *addr, int can)* find empty slot */ if (!(tb =mac_get_mc_table (smc,addr,&own,0 ,can & ~0x80 ))) -return (1 ) ; +return 1 ; tb->n++ ; tb->a = own ; tb->perm = (can &0x80 ) ?1 :0 ;
@@ -1175,7 +1175,7 @@ int mac_add_multicast(struct s_smc *smc, struct fddi_addr *addr, int can)else smc->hw.fp.os_slots_used++ ; -return (0 ) ; +return 0 ; }/*
drivers/net/skfp/hwmtm.c +15 -15
@@ -232,16 +232,16 @@ u_int mac_drv_check_space(void)#ifdef COMMON_MB_POOL call_count++ ;if (call_count ==1 ) { -return (EXT_VIRT_MEM ) ; +return EXT_VIRT_MEM ; }else { -return (EXT_VIRT_MEM_2 ) ; +return EXT_VIRT_MEM_2 ; }#else -return (EXT_VIRT_MEM ) ; +return EXT_VIRT_MEM ;#endif #else -return (0 ) ; +return 0 ;#endif }
@@ -271,7 +271,7 @@ int mac_drv_init(struct s_smc *smc)if (!(smc->os.hwm.descr_p = (union s_fp_descr volatile *)mac_drv_get_desc_mem (smc,(u_int) (RXD_TXD_COUNT +1 )*sizeof (struct s_smt_fp_txd )))) { -return (1 ) ;/* no space the hwm modul can't work */ +return 1 ;/* no space the hwm modul can't work */ }/*
@@ -283,18 +283,18 @@ int mac_drv_init(struct s_smc *smc)#ifndef COMMON_MB_POOL if (!(smc->os.hwm.mbuf_pool.mb_start = (SMbuf *)mac_drv_get_space (smc,MAX_MBUF *sizeof (SMbuf)))) { -return (1 ) ;/* no space the hwm modul can't work */ +return 1 ;/* no space the hwm modul can't work */ }#else if (!mb_start) {if (!(mb_start = (SMbuf *)mac_drv_get_space (smc,MAX_MBUF *sizeof (SMbuf)))) { -return (1 ) ;/* no space the hwm modul can't work */ +return 1 ;/* no space the hwm modul can't work */ } }#endif #endif -return (0 ) ; +return 0 ; }/*
@@ -349,7 +349,7 @@ static u_long init_descr_ring(struct s_smc *smc,DRV_BUF_FLUSH (&d1->r,DDI_DMA_SYNC_FORDEV ) ; d1++; } -return (phys) ; +return phys; }static void init_txd_ring (struct s_smc *smc)
@@ -502,7 +502,7 @@ SMbuf *smt_get_mbuf(struct s_smc *smc) mb->sm_use_count =1 ; }DB_GEN ("get SMbuf: mb = %x" ,(void *)mb,0 ,3 ) ; -return (mb) ;/* May be NULL */ +return mb;/* May be NULL */ }void smt_free_mbuf (struct s_smc *smc,SMbuf *mb)
@@ -621,7 +621,7 @@ static u_long repair_txd_ring(struct s_smc *smc, struct s_smt_tx_queue *queue) t = t->txd_next ; tx_used-- ; } -return (phys) ; +return phys; }/*
@@ -673,7 +673,7 @@ static u_long repair_rxd_ring(struct s_smc *smc, struct s_smt_rx_queue *queue) r = r->rxd_next ; rx_used-- ; } -return (phys) ; +return phys; }
@@ -1595,7 +1595,7 @@ int hwm_tx_init(struct s_smc *smc, u_char fc, int frag_count, int frame_len, }DB_TX ("frame_status = %x" ,frame_status,0 ,3 ) ;NDD_TRACE ("THiE" ,frame_status,smc->os.hwm.tx_p->tx_free,0 ) ; -return (frame_status) ; +return frame_status; }/*
@@ -1764,7 +1764,7 @@ static SMbuf *get_llc_rx(struct s_smc *smc) smc->os.hwm.llc_rx_pipe = mb->sm_next ; }DB_GEN ("get_llc_rx: mb = 0x%x" ,(void *)mb,0 ,4 ) ; -return (mb) ; +return mb; }/*
@@ -1797,7 +1797,7 @@ static SMbuf *get_txd_mb(struct s_smc *smc) smc->os.hwm.txd_tx_pipe = mb->sm_next ; }DB_GEN ("get_txd_mb: mb = 0x%x" ,(void *)mb,0 ,4 ) ; -return (mb) ; +return mb; }/*
drivers/net/skfp/hwt.c +2 -2
@@ -179,7 +179,7 @@ u_long hwt_read(struct s_smc *smc)else smc->hw.t_stop = smc->hw.t_start - tr ; } -return (smc->hw.t_stop) ; +return smc->hw.t_stop; }#ifdef PCI
@@ -208,7 +208,7 @@ u_long hwt_quick_read(struct s_smc *smc)outpw (ADDR (B2_TI_CRTL ),TIM_START ) ;outpd (ADDR (B2_TI_INI ),interval) ; -return (time) ; +return time; }/************************
drivers/net/skfp/pcmplc.c +11 -11
@@ -504,7 +504,7 @@ int sm_pm_get_ls(struct s_smc *smc, int phy)#ifdef CONCENTRATOR if (!plc_is_installed (smc,phy)) -return (PC_QLS ) ; +return PC_QLS ;#endif state =inpw (PLC (phy,PL_STATUS_A )) &PL_LINE_ST ;
@@ -528,7 +528,7 @@ int sm_pm_get_ls(struct s_smc *smc, int phy)default : state =PC_LS_NONE ; } -return (state) ; +return state; }static int plc_send_bits (struct s_smc *smc,struct s_phy *phy,int len)
@@ -547,7 +547,7 @@ static int plc_send_bits(struct s_smc *smc, struct s_phy *phy, int len)#if 0 printf ("PL_PCM_SIGNAL is set\n" ) ;#endif -return (1 ) ; +return 1 ; }/* write bit[n] & length = 1 to regs */ outpw (PLC (np,PL_VECTOR_LEN ),len-1 ) ;/* len=nr-1 */
@@ -562,7 +562,7 @@ static int plc_send_bits(struct s_smc *smc, struct s_phy *phy, int len)printf ("SIGNALING bit %d .. %d\n" ,phy->bitn,phy->bitn+len-1 ) ;#endif #endif -return (0 ) ; +return 0 ; }/*
@@ -1590,12 +1590,12 @@ int pcm_status_twisted(struct s_smc *smc) {int twist =0 ;if (smc->s.sas !=SMT_DAS ) -return (0 ) ; +return 0 ;if (smc->y[PA ].twisted && (smc->y[PA ].mib->fddiPORTPCMState ==PC8_ACTIVE )) twist |=1 ;if (smc->y[PB ].twisted && (smc->y[PB ].mib->fddiPORTPCMState ==PC8_ACTIVE )) twist |=2 ; -return (twist) ; +return twist; }/*
@@ -1636,9 +1636,9 @@ int pcm_rooted_station(struct s_smc *smc)for (n =0 ; n <NUMPHYS ; n++) {if (smc->y[n].mib->fddiPORTPCMState ==PC8_ACTIVE && smc->y[n].mib->fddiPORTNeighborType ==TM ) -return (0 ) ; +return 0 ; } -return (1 ) ; +return 1 ; }/*
@@ -1915,7 +1915,7 @@ int get_pcm_state(struct s_smc *smc, int np)case PL_PC9 : pcs =PC_MAINT ;break ;default : pcs =PC_DISABLE ;break ; } -return (pcs) ; +return pcs; }char *get_linestate (struct s_smc *smc,int np)
@@ -1937,7 +1937,7 @@ char *get_linestate(struct s_smc *smc, int np)default : ls ="unknown" ;break ;#endif } -return (ls) ; +return ls; }char *get_pcmstate (struct s_smc *smc,int np)
@@ -1959,7 +1959,7 @@ char *get_pcmstate(struct s_smc *smc, int np)case PL_PC9 : pcs ="MAINT" ;break ;default : pcs ="UNKNOWN" ;break ; } -return (pcs) ; +return pcs; }void list_phy (struct s_smc *smc)
drivers/net/skfp/pmf.c +30 -32
174 lines not on this page · raw message
drivers/net/skfp/queue.c +1 -1
@@ -128,7 +128,7 @@ u_short smt_online(struct s_smc *smc, int on) {queue_event (smc,EVENT_ECM ,on ?EC_CONNECT :EC_DISCONNECT ) ;ev_dispatcher (smc) ; -return (smc->mib.fddiSMTCF_State) ; +return smc->mib.fddiSMTCF_State; }/*
drivers/net/skfp/skfddi.c +16 -16
@@ -440,7 +440,7 @@ static int skfp_driver_init(struct net_device *dev)smt_reset_defaults (smc,0 ); -return (0 ); +return 0 ; fail:if (bp->SharedMemAddr) {
@@ -516,7 +516,7 @@ static int skfp_open(struct net_device *dev)mac_drv_rx_mode (smc,RX_DISABLE_PROMISC );netif_start_queue (dev); -return (0 ); +return 0 ; }// skfp_open
@@ -565,7 +565,7 @@ static int skfp_close(struct net_device *dev)skb_queue_purge (&bp->SendSkbQueue); bp->QueueSkb =MAX_TX_QUEUE_LEN ; -return (0 ); +return 0 ; }// skfp_close
@@ -794,7 +794,7 @@ static struct net_device_stats *skfp_ctl_get_stats(struct net_device *dev) bp->stats.port_lem_cts[1 ] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[1 ].ls;#endif -return ((struct net_device_stats *) &bp->os.MacStat); +return (struct net_device_stats *)&bp->os.MacStat; }// ctl_get_stat
@@ -932,7 +932,7 @@ static int skfp_ctl_set_mac_address(struct net_device *dev, void *addr)ResetAdapter (smc);spin_unlock_irqrestore (&bp->DriverLock, Flags); -return (0 );/* always return zero */ +return 0 ;/* always return zero */ }// skfp_ctl_set_mac_address
@@ -1313,7 +1313,7 @@ void *mac_drv_get_space(struct s_smc *smc, unsigned int size)if ((smc->os.SharedMemHeap + size) > smc->os.SharedMemSize) {printk ("Unexpected SMT memory size requested: %d\n" , size); -return (NULL ); +return NULL ; } smc->os.SharedMemHeap += size;// Move heap pointer.
@@ -1322,7 +1322,7 @@ void *mac_drv_get_space(struct s_smc *smc, unsigned int size)pr_debug ("bus addr: %lx\n" , (ulong) (smc->os.SharedMemDMA + ((char *) virt - (char *)smc->os.SharedMemAddr))); -return (virt); +return virt; }// mac_drv_get_space
@@ -1363,9 +1363,9 @@ void *mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size)if (!mac_drv_get_space (smc, size)) {printk ("fddi: Unable to align descriptor memory.\n" ); -return (NULL ); +return NULL ; } -return (virt + size); +return virt + size; }// mac_drv_get_desc_mem
@@ -1384,8 +1384,8 @@ void *mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size)************************/ unsigned long mac_drv_virt2phys (struct s_smc *smc,void *virt) { -return (smc->os.SharedMemDMA + - ((char *) virt - (char *)smc->os.SharedMemAddr)); +return smc->os.SharedMemDMA + + ((char *) virt - (char *)smc->os.SharedMemAddr); }// mac_drv_virt2phys
@@ -1419,8 +1419,8 @@ unsigned long mac_drv_virt2phys(struct s_smc *smc, void *virt)************************/ u_long dma_master (struct s_smc * smc,void *virt,int len,int flag) { -return (smc->os.SharedMemDMA + - ((char *) virt - (char *)smc->os.SharedMemAddr)); +return smc->os.SharedMemDMA + + ((char *) virt - (char *)smc->os.SharedMemAddr); }// dma_master
@@ -1904,12 +1904,12 @@ int mac_drv_rx_init(struct s_smc *smc, int len, int fc,pr_debug ("fddi: Discard invalid local SMT frame\n" );pr_debug (" len=%d, la_len=%d, (ULONG) look_ahead=%08lXh.\n" , len, la_len, (unsigned long ) look_ahead); -return (0 ); +return 0 ; } skb =alloc_skb (len +3 ,GFP_ATOMIC );if (!skb) {pr_debug ("fddi: Local SMT: skb memory exhausted.\n" ); -return (0 ); +return 0 ; }skb_reserve (skb,3 );skb_put (skb, len);
@@ -1919,7 +1919,7 @@ int mac_drv_rx_init(struct s_smc *smc, int len, int fc, skb->protocol =fddi_type_trans (skb, smc->os.dev);netif_rx (skb); -return (0 ); +return 0 ; }// mac_drv_rx_init
drivers/net/skfp/smt.c +39 -39
228 lines not on this page · raw message
drivers/net/skfp/smtdef.c +2 -2
@@ -303,7 +303,7 @@ int smt_set_mac_opvalues(struct s_smc *smc)FDDI_SMT_EVENT , (u_long )FDDI_REMOTE_T_REQ , smt_get_event_word(smc)); } -return (st) ; +return st; }void smt_fixup_mib (struct s_smc *smc)
@@ -350,6 +350,6 @@ static int set_min_max(int maxflag, u_long mib, u_long limit, u_long *oper) *oper = limit ; else *oper = mib ; -return (old != *oper) ; +return old != *oper; }
drivers/net/skfp/smtinit.c +1 -1
@@ -120,6 +120,6 @@ int init_smt(struct s_smc *smc, u_char *mac_addr)PNMI_INIT (smc) ;/* PNMI initialization */ -return (0 ) ; +return 0 ; }
drivers/net/skfp/srf.c +1 -1
@@ -165,7 +165,7 @@ static struct s_srf_evc *smt_get_evc(struct s_smc *smc, int code, int index)for (i =0 , evc = smc->evcs ; (unsigned ) i <MAX_EVCS ; i++, evc++) {if (evc->evc_code == code && evc->evc_index == index) -return (evc) ; +return evc; }return NULL ; }
drivers/net/slip.c +1 -1
@@ -944,7 +944,7 @@ static int slip_esc(unsigned char *s, unsigned char *d, int len) } } *ptr++ =END ; -return (ptr - d); +return ptr - d; }static void slip_unesc (struct slip *sl,unsigned char s)
drivers/net/sun3lance.c +2 -2
@@ -436,7 +436,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 |CSR0_STRT |CSR0_INEA ;
@@ -445,7 +445,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 ; }
drivers/net/sungem_phy.c +1 -1
@@ -88,7 +88,7 @@ static int reset_one_mii_phy(struct mii_phy* phy, int phy_id)if ((val &BMCR_ISOLATE ) && limit >0 )__phy_write (phy, phy_id,MII_BMCR , val & ~BMCR_ISOLATE ); -return (limit <=0 ); +return limit <=0 ; }static int bcm5201_init (struct mii_phy * phy)
drivers/net/sunhme.c +1 -1
@@ -2497,7 +2497,7 @@ static u32 hme_get_link(struct net_device *dev) hp->sw_bmcr =happy_meal_tcvr_read (hp, hp->tcvregs,MII_BMCR );spin_unlock_irq (&hp->happy_lock); -return (hp->sw_bmsr &BMSR_LSTATUS ); +return hp->sw_bmsr &BMSR_LSTATUS ; }static const struct ethtool_ops hme_ethtool_ops = {
drivers/net/sunqe.c +1 -1
@@ -711,7 +711,7 @@ static u32 qe_get_link(struct net_device *dev) phyconfig =sbus_readb (mregs +MREGS_PHYCONFIG );spin_unlock_irq (&qep->lock); -return (phyconfig &MREGS_PHYCONFIG_LSTAT ); +return phyconfig &MREGS_PHYCONFIG_LSTAT ; }static const struct ethtool_ops qe_ethtool_ops = {
drivers/net/tc35815.c +1 -1
@@ -1167,7 +1167,7 @@ static void print_eth(const u8 *add)static int tc35815_tx_full (struct net_device *dev) {struct tc35815_local *lp =netdev_priv (dev); -return ((lp->tfd_start +1 ) %TX_FD_NUM == lp->tfd_end); +return (lp->tfd_start +1 ) %TX_FD_NUM == lp->tfd_end; }static void tc35815_restart (struct net_device *dev)
drivers/net/tg3.c +2 -3
@@ -5389,8 +5389,7 @@ static inline int tg3_4g_overflow_test(dma_addr_t mapping, int len) {u32 base = (u32 ) mapping &0xffffffff ; -return ((base >0xffffdcc0 ) && - (base + len +8 < base)); +return (base >0xffffdcc0 ) && (base + len +8 < base); }/* Test for DMA addresses > 40-bit */
@@ -5399,7 +5398,7 @@ static inline int tg3_40bit_overflow_test(struct tg3 *tp, dma_addr_t mapping, {#if defined(CONFIG_HIGHMEM ) && (BITS_PER_LONG ==64 )if (tp->tg3_flags &TG3_FLAG_40BIT_DMA_BUG ) -return (((u64 ) mapping + len) >DMA_BIT_MASK (40 )); +return ((u64 ) mapping + len) >DMA_BIT_MASK (40 );return 0 ;#else return 0 ;
drivers/net/tlan.c +1 -1
@@ -3187,7 +3187,7 @@ static int TLan_EeSendByte( u16 io_base, u8 data, int stop )TLan_SetBit (TLAN_NET_SIO_EDATA , sio ); } -return ( err ); +return err; }/* TLan_EeSendByte */
drivers/net/tlan.h +4 -4
@@ -442,7 +442,7 @@ typedef struct tlan_private_tag {static inline u8 TLan_DioRead8 (u16 base_addr,u16 internal_addr) {outw (internal_addr, base_addr +TLAN_DIO_ADR ); -return (inb ((base_addr +TLAN_DIO_DATA ) + (internal_addr &0x3 ))); +return inb ((base_addr +TLAN_DIO_DATA ) + (internal_addr &0x3 )); }/* TLan_DioRead8 */
@@ -452,7 +452,7 @@ static inline u8 TLan_DioRead8(u16 base_addr, u16 internal_addr)static inline u16 TLan_DioRead16 (u16 base_addr,u16 internal_addr) {outw (internal_addr, base_addr +TLAN_DIO_ADR ); -return (inw ((base_addr +TLAN_DIO_DATA ) + (internal_addr &0x2 ))); +return inw ((base_addr +TLAN_DIO_DATA ) + (internal_addr &0x2 )); }/* TLan_DioRead16 */
@@ -462,7 +462,7 @@ static inline u16 TLan_DioRead16(u16 base_addr, u16 internal_addr)static inline u32 TLan_DioRead32 (u16 base_addr,u16 internal_addr) {outw (internal_addr, base_addr +TLAN_DIO_ADR ); -return (inl (base_addr +TLAN_DIO_DATA )); +return inl (base_addr +TLAN_DIO_DATA ); }/* TLan_DioRead32 */
@@ -537,6 +537,6 @@ static inline u32 TLan_HashFunc( const u8 *a ) hash ^= ((a[2 ]^a[5 ])<<4 );/* & 060 */ hash ^= ((a[2 ]^a[5 ])>>2 );/* & 077 */ - return (hash & 077); + return hash & 077; }#endif
drivers/net/tokenring/proteon.c +1 -1
@@ -110,7 +110,7 @@ static int __init proteon_probe1(struct net_device *dev, int ioaddr) } dev->base_addr = ioaddr; -return (0 ); +return 0 ; nodev:release_region (ioaddr,PROTEON_IO_EXTENT );return -ENODEV ;
drivers/net/tokenring/smctr.c +251 -249
444 lines not on this page · raw message
drivers/net/tokenring/tms380tr.c +29 -29
58 lines not on this page · raw message
drivers/net/wan/dlci.c +21 -21
42 lines not on this page · raw message
drivers/net/wan/sdla.c +54 -54
108 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
PATCH 1/1 drivers/net: more return operator cleanup
Change "return (EXPR);" to "return EXPR;"
return is not a function, parentheses are not required.
drivers/net/wireless excluded.
Most whitespace errors on same line as return fixed.
Done via script with some manual multi-line aligning. Compile tested x86 only, not all files compiled.
--- drivers/net/3c523.c | 2 +- drivers/net/appletalk/ipddp.c | 10 +- drivers/net/appletalk/ltpc.c | 2 +- drivers/net/atarilance.c | 24 +- drivers/net/atlx/atl1.c | 4 +- drivers/net/benet/be.h | 2 +- drivers/net/benet/be_cmds.c | 4 +- drivers/net/bmac.c | 4 +- drivers/net/bna/bna_ctrl.c | 6 +- drivers/net/bnx2.c | 22 +- drivers/net/bnx2x/bnx2x_cmn.h | 4 +- drivers/net/bonding/bond_3ad.c | 6 +- drivers/net/bonding/bonding.h | 4 +- drivers/net/bsd_comp.c | 2 +- drivers/net/cassini.c | 4 +- drivers/net/chelsio/sge.c | 2 +- drivers/net/chelsio/vsc7326.c | 2 +- drivers/net/cxgb3/cxgb3_offload.c | 2 +- drivers/net/de620.c | 2 +- drivers/net/defxx.c | 66 +++--- drivers/net/dl2k.c | 2 +- drivers/net/e100.c | 11 +- drivers/net/e1000/e1000_main.c | 2 +- drivers/net/e1000e/ethtool.c | 4 +- drivers/net/e1000e/netdev.c | 2 +- drivers/net/enic/vnic_dev.h | 3 +- drivers/net/enic/vnic_rq.h | 2 +- drivers/net/eth16i.c | 12 +- drivers/net/fsl_pq_mdio.c | 4 +- drivers/net/gianfar_ethtool.c | 4 +- drivers/net/hamradio/bpqether.c | 2 +- drivers/net/hamradio/hdlcdrv.c | 2 +- drivers/net/hp100.c | 6 +- drivers/net/ibm_newemac/core.c | 6 +- drivers/net/ibm_newemac/core.h | 6 +- drivers/net/igb/igb_main.c | 2 +- drivers/net/igbvf/ethtool.c | 2 +- drivers/net/igbvf/netdev.c | 2 +- drivers/net/irda/donauboe.c | 4 +- drivers/net/irda/irda-usb.c | 2 +- drivers/net/irda/nsc-ircc.c | 2 +- drivers/net/irda/sir_dev.c | 2 +- drivers/net/irda/smsc-ircc2.c | 2 +- drivers/net/irda/stir4200.c | 2 +- drivers/net/irda/via-ircc.h | 2 +- drivers/net/irda/vlsi_ir.h | 2 +- drivers/net/ixgb/ixgb_ee.c | 32 +- drivers/net/ixgb/ixgb_ethtool.c | 2 +- drivers/net/ixgb/ixgb_hw.c | 18 +- drivers/net/ixgbe/ixgbe_ethtool.c | 6 +- drivers/net/ixgbe/ixgbe_main.c | 2 +- drivers/net/ixgbevf/ixgbevf_main.c | 2 +- drivers/net/ll_temac_main.c | 2 +- drivers/net/lp486e.c | 2 +- drivers/net/meth.c | 2 +- drivers/net/mlx4/en_selftest.c | 2 +- drivers/net/myri10ge/myri10ge.c | 6 +- drivers/net/myri_sbus.c | 2 +- drivers/net/netxen/netxen_nic_init.c | 4 +- drivers/net/netxen/netxen_nic_main.c | 2 +- drivers/net/niu.c | 17 +- drivers/net/niu.h | 3 +- drivers/net/pcmcia/nmclan_cs.c | 2 +- drivers/net/pcmcia/smc91c92_cs.c | 2 +- drivers/net/pcnet32.c | 4 +- drivers/net/phy/mdio_bus.c | 4 +- drivers/net/ps3_gelic_wireless.c | 6 +- drivers/net/qla3xxx.c | 2 +- drivers/net/qlcnic/qlcnic_main.c | 2 +- drivers/net/sfc/net_driver.h | 2 +- drivers/net/sfc/nic.c | 10 +- drivers/net/sfc/rx.c | 8 +- drivers/net/sis900.c | 6 +- drivers/net/skfp/cfm.c | 10 +- drivers/net/skfp/drvfbi.c | 16 +- drivers/net/skfp/ess.c | 46 ++-- drivers/net/skfp/fplustm.c | 24 +- drivers/net/skfp/hwmtm.c | 30 +- drivers/net/skfp/hwt.c | 4 +- drivers/net/skfp/pcmplc.c | 22 +- drivers/net/skfp/pmf.c | 56 ++-- drivers/net/skfp/queue.c | 2 +- drivers/net/skfp/skfddi.c | 32 +- drivers/net/skfp/smt.c | 90 +++--- drivers/net/skfp/smtdef.c | 4 +- drivers/net/skfp/smtinit.c | 2 +- drivers/net/skfp/srf.c | 2 +- drivers/net/slip.c | 2 +- drivers/net/smsc911x.c | 4 +- drivers/net/sun3lance.c | 4 +- drivers/net/sunbmac.c | 2 +- drivers/net/sungem_phy.c | 2 +- drivers/net/sunhme.c | 2 +- drivers/net/sunqe.c | 2 +- drivers/net/tc35815.c | 2 +- drivers/net/tg3.c | 5 +- drivers/net/tlan.c | 2 +- drivers/net/tlan.h | 10 +- drivers/net/tokenring/proteon.c | 2 +- drivers/net/tokenring/smctr.c | 501 +++++++++++++++++----------------- drivers/net/tokenring/tms380tr.c | 58 ++-- drivers/net/tsi108_eth.c | 2 +- drivers/net/tulip/de4x5.c | 39 ++-- drivers/net/tulip/uli526x.c | 2 +- drivers/net/typhoon.c | 2 +- drivers/net/usb/cdc_ether.c | 18 +- drivers/net/usb/sierra_net.c | 4 +- drivers/net/veth.c | 2 +- drivers/net/wan/dlci.c | 43 ++-- drivers/net/wan/lmc/lmc_main.c | 4 +- drivers/net/wan/n2.c | 4 +- drivers/net/wan/pc300_drv.c | 18 +- drivers/net/wan/pc300_tty.c | 2 +- drivers/net/wan/sdla.c | 110 ++++---- drivers/net/wan/x25_asy.c | 2 +- drivers/net/xen-netfront.c | 6 +- 116 files changed, 809 insertions(+), 805 deletions(-)
drivers/net/3c523.c +1 -1
@@ -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);
drivers/net/appletalk/ipddp.c +5 -5
@@ -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 ;
drivers/net/appletalk/ltpc.c +1 -1
@@ -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;
drivers/net/atarilance.c +12 -12
@@ -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 ; }
drivers/net/atlx/atl1.c +2 -2
@@ -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,
drivers/net/benet/be.h +1 -1
@@ -336,7 +336,7 @@ extern const struct ethtool_ops be_ethtool_ops;/* Returns the bit mask of the field that is NOT shifted into location. */ static inline u32 amap_mask (u32 bitsize) { -return (bitsize ==32 ?0xFFFFFFFF : (1 << bitsize) -1 ); +return bitsize ==32 ?0xFFFFFFFF : (1 << bitsize) -1 ; } static inline void
drivers/net/benet/be_cmds.c +2 -2
@@ -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)
drivers/net/bmac.c +2 -2
@@ -853,7 +853,7 @@ bmac_crc(unsigned short *address) newcrc =crc416 (newcrc, address[1 ]);/* address bits 31 - 16 */ newcrc =crc416 (newcrc, address[2 ]);/* address bits 15 - 0 */ -return (newcrc); +return newcrc; }/*
@@ -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" );
drivers/net/bna/bna_ctrl.c +3 -3
@@ -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
drivers/net/bnx2.c +11 -11
@@ -266,7 +266,7 @@ static inline u32 bnx2_tx_avail(struct bnx2 *bp, struct bnx2_tx_ring_info *txr)if (diff ==TX_DESC_CNT ) diff =MAX_TX_DESC_CNT ; } -return (bp->tx_ring_size - diff); +return bp->tx_ring_size - diff; } static u32
@@ -299,7 +299,7 @@ bnx2_shmem_wr(struct bnx2 *bp, u32 offset, u32 val)static u32 bnx2_shmem_rd (struct bnx2 *bp,u32 offset) { -return (bnx2_reg_rd_ind (bp, bp->shmem_base + offset)); +return bnx2_reg_rd_ind (bp, bp->shmem_base + offset); } static void
@@ -977,9 +977,9 @@ bnx2_report_fw_link(struct bnx2 *bp)static char *bnx2_xceiver_str (struct bnx2 *bp) { -return ((bp->phy_port ==PORT_FIBRE ) ?"SerDes" : - ((bp->phy_flags &BNX2_PHY_FLAG_SERDES ) ?"Remote Copper" : -"Copper" )); +return (bp->phy_port ==PORT_FIBRE ) ?"SerDes" : + (bp->phy_flags &BNX2_PHY_FLAG_SERDES ) ?"Remote Copper" : +"Copper" ; } static void
@@ -1758,7 +1758,7 @@ __acquires(&bp->phy_lock)u32 new_adv =0 ;if (bp->phy_flags &BNX2_PHY_FLAG_REMOTE_PHY_CAP ) -return (bnx2_setup_remote_phy (bp, port)); +return bnx2_setup_remote_phy (bp, port);if (!(bp->autoneg &AUTONEG_SPEED )) {u32 new_bmcr;
@@ -2171,10 +2171,10 @@ __acquires(&bp->phy_lock)return 0 ;if (bp->phy_flags &BNX2_PHY_FLAG_SERDES ) { -return (bnx2_setup_serdes_phy (bp, port)); +return bnx2_setup_serdes_phy (bp, port); }else { -return (bnx2_setup_copper_phy (bp)); +return bnx2_setup_copper_phy (bp); } }
@@ -7582,9 +7582,9 @@ bnx2_set_tx_csum(struct net_device *dev, u32 data)struct bnx2 *bp =netdev_priv (dev);if (CHIP_NUM (bp) ==CHIP_NUM_5709 ) -return (ethtool_op_set_tx_ipv6_csum (dev, data)); +return ethtool_op_set_tx_ipv6_csum (dev, data);else -return (ethtool_op_set_tx_csum (dev, data)); +return ethtool_op_set_tx_csum (dev, data); } static int
@@ -7705,7 +7705,7 @@ bnx2_change_mtu(struct net_device *dev, int new_mtu)return -EINVAL ; dev->mtu = new_mtu; -return (bnx2_change_ring_size (bp, bp->rx_ring_size, bp->tx_ring_size)); +return bnx2_change_ring_size (bp, bp->rx_ring_size, bp->tx_ring_size); }#ifdef CONFIG_NET_POLL_CONTROLLER
drivers/net/bnx2x/bnx2x_cmn.h +2 -2
@@ -399,7 +399,7 @@ static inline int bnx2x_has_tx_work_unload(struct bnx2x_fastpath *fp) {/* Tell compiler that consumer and producer can change */ barrier (); -return (fp->tx_pkt_prod != fp->tx_pkt_cons); +return fp->tx_pkt_prod != fp->tx_pkt_cons; }static inline u16 bnx2x_tx_avail (struct bnx2x_fastpath *fp)
@@ -632,7 +632,7 @@ static inline int bnx2x_has_rx_work(struct bnx2x_fastpath *fp) rx_cons_sb =le16_to_cpu (*fp->rx_cons_sb);if ((rx_cons_sb &MAX_RCQ_DESC_CNT ) ==MAX_RCQ_DESC_CNT ) rx_cons_sb++; -return (fp->rx_comp_cons != rx_cons_sb); +return fp->rx_comp_cons != rx_cons_sb; }/* HW Lock for shared dual port PHYs */
drivers/net/bonding/bond_3ad.c +3 -3
@@ -252,7 +252,7 @@ static inline void __enable_port(struct port *port)*/ static inline int __port_is_enabled (struct port *port) { -return (port->slave->state ==BOND_STATE_ACTIVE ); +return port->slave->state ==BOND_STATE_ACTIVE ; }/**
@@ -1485,8 +1485,8 @@ static struct aggregator *ad_agg_selection_test(struct aggregator *best,static int agg_device_up (const struct aggregator *agg) { -return (netif_running (agg->slave->dev) && -netif_carrier_ok (agg->slave->dev)); +return netif_running (agg->slave->dev) && +netif_carrier_ok (agg->slave->dev); }/**
drivers/net/bonding/bonding.h +2 -2
@@ -258,8 +258,8 @@ static inline struct bonding *bond_get_bond_by_slave(struct slave *slave)static inline bool bond_is_lb (const struct bonding *bond) { -return (bond->params.mode ==BOND_MODE_TLB || - bond->params.mode ==BOND_MODE_ALB ); +return bond->params.mode ==BOND_MODE_TLB || + bond->params.mode ==BOND_MODE_ALB ; }#define BOND_PRI_RESELECT_ALWAYS 0
drivers/net/bsd_comp.c +1 -1
@@ -429,7 +429,7 @@ static void *bsd_alloc (unsigned char *options, int opt_len, int decomp)if (!db->lens) {bsd_free (db); -return (NULL ); +return NULL ; } }/*
drivers/net/cassini.c +2 -2
@@ -419,7 +419,7 @@ static u16 cas_phy_read(struct cas *cp, int reg)udelay (10 ); cmd =readl (cp->regs +REG_MIF_FRAME );if (cmd &MIF_FRAME_TURN_AROUND_LSB ) -return (cmd &MIF_FRAME_DATA_MASK ); +return cmd &MIF_FRAME_DATA_MASK ; }return 0xFFFF ;/* -1 */ }
@@ -804,7 +804,7 @@ static int cas_reset_mii_phy(struct cas *cp)break ;udelay (10 ); } -return (limit <=0 ); +return limit <=0 ; }static int cas_saturn_firmware_init (struct cas *cp)
drivers/net/chelsio/sge.c +1 -1
@@ -1551,7 +1551,7 @@ static inline int responses_pending(const struct adapter *adapter)const struct respQ *Q = &adapter->sge->respQ;const struct respQ_e *e = &Q ->entries[Q ->cidx]; -return (e->GenerationBit ==Q ->genbit); +return e->GenerationBit ==Q ->genbit; }/*
drivers/net/chelsio/vsc7326.c +1 -1
@@ -255,7 +255,7 @@ static int bist_rd(adapter_t *adapter, int moduleid, int address)else if ((result & (1 <<8 )) !=0x0 )pr_err ("bist read error: 0x%x\n" , result); -return (result &0xff ); +return result &0xff ; }static int bist_wr (adapter_t *adapter,int moduleid,int address,int value)
drivers/net/cxgb3/cxgb3_offload.c +1 -1
@@ -64,7 +64,7 @@ static inline int offload_activated(struct t3cdev *tdev) {const struct adapter *adapter =tdev2adap (tdev); -return (test_bit (OFFLOAD_DEVMAP_BIT , &adapter->open_device_map)); +return test_bit (OFFLOAD_DEVMAP_BIT , &adapter->open_device_map); }/**
drivers/net/de620.c +1 -1
@@ -676,7 +676,7 @@ static int de620_rx_intr(struct net_device *dev)de620_set_register (dev,W_NPRF , next_rx_page);pr_debug ("next_rx_page=%d CPR=%d\n" , next_rx_page, curr_page); -return (next_rx_page != curr_page);/* That was slightly tricky... */ +return next_rx_page != curr_page;/* That was slightly tricky... */ }/*********************************************
drivers/net/defxx.c +33 -33
245 lines not on this page · raw message
drivers/net/dl2k.c +1 -1
@@ -1372,7 +1372,7 @@ mii_getbit (struct net_device *dev)mii_delay ();writeb (data |MII_CLK , ioaddr);mii_delay (); -return ((readb (ioaddr) >>1 ) &1 ); +return (readb (ioaddr) >>1 ) &1 ; } static void
drivers/net/e100.c +6 -5
@@ -1049,7 +1049,7 @@ static inline int e100_phy_supports_mii(struct nic *nic)/* for now, just check it by comparing whether we are using MII software emulation. */ -return (nic->mdio_ctrl != mdio_ctrl_phy_mii_emulated); +return nic->mdio_ctrl != mdio_ctrl_phy_mii_emulated; }static void e100_get_defaults (struct nic *nic)
@@ -2215,10 +2215,11 @@ static int e100_change_mtu(struct net_device *netdev, int new_mtu)static int e100_asf (struct nic *nic) {/* ASF can be enabled from eeprom */ -return ((nic->pdev->device >=0x1050 ) && (nic->pdev->device <=0x1057 ) && - (nic->eeprom[eeprom_config_asf] & eeprom_asf) && - !(nic->eeprom[eeprom_config_asf] & eeprom_gcl) && - ((nic->eeprom[eeprom_smbus_addr] &0xFF ) !=0xFE )); +return (nic->pdev->device >=0x1050 ) && + (nic->pdev->device <=0x1057 ) && + (nic->eeprom[eeprom_config_asf] & eeprom_asf) && + !(nic->eeprom[eeprom_config_asf] & eeprom_gcl) && + ((nic->eeprom[eeprom_smbus_addr] &0xFF ) !=0xFE ); }static int e100_up (struct nic *nic)
drivers/net/e1000/e1000_main.c +1 -1
@@ -3600,7 +3600,7 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter, adapter->total_tx_packets += total_tx_packets; netdev->stats.tx_bytes += total_tx_bytes; netdev->stats.tx_packets += total_tx_packets; -return (count < tx_ring->count); +return count < tx_ring->count; }/**
drivers/net/e1000e/ethtool.c +2 -2
@@ -368,7 +368,7 @@ out:static u32 e1000_get_rx_csum (struct net_device *netdev) {struct e1000_adapter *adapter =netdev_priv (netdev); -return (adapter->flags &FLAG_RX_CSUM_ENABLED ); +return adapter->flags &FLAG_RX_CSUM_ENABLED ; }static int e1000_set_rx_csum (struct net_device *netdev,u32 data)
@@ -389,7 +389,7 @@ static int e1000_set_rx_csum(struct net_device *netdev, u32 data)static u32 e1000_get_tx_csum (struct net_device *netdev) { -return ((netdev->features &NETIF_F_HW_CSUM ) !=0 ); +return (netdev->features &NETIF_F_HW_CSUM ) !=0 ; }static int e1000_set_tx_csum (struct net_device *netdev,u32 data)
drivers/net/e1000e/netdev.c +1 -1
@@ -1053,7 +1053,7 @@ static bool e1000_clean_tx_irq(struct e1000_adapter *adapter) adapter->total_tx_packets += total_tx_packets; netdev->stats.tx_bytes += total_tx_bytes; netdev->stats.tx_packets += total_tx_packets; -return (count < tx_ring->count); +return count < tx_ring->count; }/**
drivers/net/enic/vnic_dev.h +1 -2
@@ -30,8 +30,7 @@#ifndef readqstatic inline u64 readq (void __iomem *reg) { -return (((u64 )readl (reg +0x4UL ) <<32 ) | - (u64 )readl (reg)); +return ((u64 )readl (reg +0x4UL ) <<32 ) | (u64 )readl (reg); }static inline void writeq (u64 val,void __iomem *reg)
drivers/net/enic/vnic_rq.h +1 -1
@@ -143,7 +143,7 @@ static inline void vnic_rq_post(struct vnic_rq *rq,static inline int vnic_rq_posting_soon (struct vnic_rq *rq) { -return ((rq->to_use->index &VNIC_RQ_RETURN_RATE ) ==0 ); +return (rq->to_use->index &VNIC_RQ_RETURN_RATE ) ==0 ; }static inline void vnic_rq_return_descs (struct vnic_rq *rq,unsigned int count)
drivers/net/eth16i.c +6 -6
@@ -796,7 +796,7 @@ static int eth16i_receive_probe_packet(int ioaddr)if (eth16i_debug >1 )printk (KERN_DEBUG "RECEIVE_PACKET\n" ); -return (0 );/* Found receive packet */ +return 0 ;/* Found receive packet */ } }
@@ -805,7 +805,7 @@ static int eth16i_receive_probe_packet(int ioaddr)printk (KERN_DEBUG "RX_STATUS_REG = %x\n" ,inb (ioaddr +RX_STATUS_REG )); } -return (0 );/* Return success */ +return 0 ;/* Return success */ }#if 0
@@ -841,7 +841,7 @@ static int __init eth16i_get_irq(int ioaddr)if ( ioaddr <0x1000 ) { cbyte =inb (ioaddr +JUMPERLESS_CONFIG ); -return ( eth16i_irqmap[ ((cbyte &0xC0 ) >>6 ) ] ); +return eth16i_irqmap[ ((cbyte &0xC0 ) >>6 ) ]; }else {/* Oh..the card is EISA so method getting IRQ different */ unsigned short index =0 ; cbyte =inb (ioaddr +EISA_IRQ_REG );
@@ -849,7 +849,7 @@ static int __init eth16i_get_irq(int ioaddr) cbyte = cbyte >>1 ; index++; } -return ( eth32i_irqmap[ index ] ); +return eth32i_irqmap[ index ]; } }
@@ -909,7 +909,7 @@ static int eth16i_read_eeprom(int ioaddr, int offset) data =eth16i_read_eeprom_word (ioaddr);outb (CS_0 |SK_0 , ioaddr +EEPROM_CTRL_REG ); -return (data); +return data; }static int eth16i_read_eeprom_word (int ioaddr)
@@ -928,7 +928,7 @@ static int eth16i_read_eeprom_word(int ioaddr)eeprom_slow_io (); } -return (data); +return data; }static void eth16i_eeprom_cmd (int ioaddr,unsigned char command)
drivers/net/fsl_pq_mdio.c +2 -2
@@ -125,7 +125,7 @@ int fsl_pq_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value)struct fsl_pq_mdio __iomem *regs =fsl_pq_mdio_get_regs (bus);/* Write to the local MII regs */ -return (fsl_pq_local_mdio_write (regs, mii_id, regnum, value)); +return fsl_pq_local_mdio_write (regs, mii_id, regnum, value); }/*
@@ -137,7 +137,7 @@ int fsl_pq_mdio_read(struct mii_bus *bus, int mii_id, int regnum)struct fsl_pq_mdio __iomem *regs =fsl_pq_mdio_get_regs (bus);/* Read the local MII regs */ -return (fsl_pq_local_mdio_read (regs, mii_id, regnum)); +return fsl_pq_local_mdio_read (regs, mii_id, regnum); }/* Reset the MIIM registers, and wait for the bus to free */
drivers/net/gianfar_ethtool.c +2 -2
@@ -254,7 +254,7 @@ static unsigned int gfar_usecs2ticks(struct gfar_private *priv, unsigned int use/* Make sure we return a number greater than 0 * if usecs > 0 */ -return ((usecs *1000 + count -1 ) / count); +return (usecs *1000 + count -1 ) / count; }/* Convert ethernet clock ticks to microseconds */
@@ -278,7 +278,7 @@ static unsigned int gfar_ticks2usecs(struct gfar_private *priv, unsigned int tic/* Make sure we return a number greater than 0 */ /* if ticks is > 0 */ -return ((ticks * count) /1000 ); +return (ticks * count) /1000 ; }/* Get the coalescing parameters, and put them in the cvals
drivers/net/hamradio/bpqether.c +1 -1
@@ -168,7 +168,7 @@ static inline struct net_device *bpq_get_ax25_dev(struct net_device *dev)static inline int dev_is_ethdev (struct net_device *dev) { -return (dev->type ==ARPHRD_ETHER &&strncmp (dev->name,"dummy" ,5 )); +return dev->type ==ARPHRD_ETHER &&strncmp (dev->name,"dummy" ,5 ); }/* ------------------------------------------------------------------------ */
drivers/net/hamradio/hdlcdrv.c +1 -1
@@ -110,7 +110,7 @@ static int calc_crc_ccitt(const unsigned char *buf, int cnt)for (; cnt >0 ; cnt--) crc = (crc >>8 ) ^ crc_ccitt_table[(crc ^ *buf++) &0xff ]; crc ^=0xffff ; - return (crc & 0xffff); + return crc & 0xffff; }#endif
drivers/net/hp100.c +3 -3
@@ -1312,7 +1312,7 @@ static int hp100_build_rx_pdl(hp100_ring_t * ringptr,for (p = (ringptr->pdl); p < (ringptr->pdl +5 ); p++)printk ("hp100: %s: Adr 0x%.8x = 0x%.8x\n" , dev->name, (u_int ) p, (u_int) * p);#endif -return (1 ); +return 1 ; }/* else: */ /* alloc_skb failed (no memory) -> still can receive the header
@@ -1325,7 +1325,7 @@ static int hp100_build_rx_pdl(hp100_ring_t * ringptr, ringptr->pdl[0 ] =0x00010000 ;/* PDH: Count=1 Fragment */ -return (0 ); +return 0 ; }/*
@@ -2752,7 +2752,7 @@ static int hp100_login_to_vg_hub(struct net_device *dev, u_short force_relogin)hp100_outw (HP100_MISC_ERROR ,IRQ_STATUS );if (val &HP100_LINK_UP_ST ) -return (0 );/* login was ok */ +return 0 ;/* login was ok */ else {printk ("hp100: %s: Training failed.\n" , dev->name);hp100_down_vg_link (dev);
drivers/net/ibm_newemac/core.c +3 -3
@@ -2095,11 +2095,11 @@ static void *emac_dump_regs(struct emac_instance *dev, void *buf)if (emac_has_feature (dev,EMAC_FTR_EMAC4 )) { hdr->version =EMAC4_ETHTOOL_REGS_VER ;memcpy_fromio (hdr +1 , dev->emacp,EMAC4_ETHTOOL_REGS_SIZE (dev)); -return ((void *)(hdr +1 ) +EMAC4_ETHTOOL_REGS_SIZE (dev)); +return (void *)(hdr +1 ) +EMAC4_ETHTOOL_REGS_SIZE (dev); }else { hdr->version =EMAC_ETHTOOL_REGS_VER ;memcpy_fromio (hdr +1 , dev->emacp,EMAC_ETHTOOL_REGS_SIZE (dev)); -return ((void *)(hdr +1 ) +EMAC_ETHTOOL_REGS_SIZE (dev)); +return (void *)(hdr +1 ) +EMAC_ETHTOOL_REGS_SIZE (dev); } }
@@ -2293,7 +2293,7 @@ static int __devinit emac_check_deps(struct emac_instance *dev,if (deps[i].drvdata !=NULL ) there++; } -return (there ==EMAC_DEP_COUNT ); +return there ==EMAC_DEP_COUNT ; }static void emac_put_deps (struct emac_instance *dev)
drivers/net/ibm_newemac/core.h +3 -3
@@ -410,7 +410,7 @@ static inline u32 *emac_xaht_base(struct emac_instance *dev)else offset = offsetof(struct emac_regs, u0.emac4.iaht1); -return ((u32 *)((ptrdiff_t )p + offset)); +return (u32 *)((ptrdiff_t )p + offset); }static inline u32 *emac_gaht_base (struct emac_instance *dev)
@@ -418,7 +418,7 @@ static inline u32 *emac_gaht_base(struct emac_instance *dev)/* GAHT registers always come after an identical number of * IAHT registers. */ -return (emac_xaht_base (dev) +EMAC_XAHT_REGS (dev)); +return emac_xaht_base (dev) +EMAC_XAHT_REGS (dev); }static inline u32 *emac_iaht_base (struct emac_instance *dev)
@@ -426,7 +426,7 @@ static inline u32 *emac_iaht_base(struct emac_instance *dev)/* IAHT registers always come before an identical number of * GAHT registers. */ -return (emac_xaht_base (dev)); +return emac_xaht_base (dev); }/* Ethtool get_regs complex data.
drivers/net/igb/igb_main.c +1 -1
@@ -5435,7 +5435,7 @@ static bool igb_clean_tx_irq(struct igb_q_vector *q_vector) tx_ring->total_packets += total_packets; tx_ring->tx_stats.bytes += total_bytes; tx_ring->tx_stats.packets += total_packets; -return (count < tx_ring->count); +return count < tx_ring->count; }/**
drivers/net/igbvf/ethtool.c +1 -1
@@ -153,7 +153,7 @@ static int igbvf_set_rx_csum(struct net_device *netdev, u32 data)static u32 igbvf_get_tx_csum (struct net_device *netdev) { -return ((netdev->features &NETIF_F_IP_CSUM ) !=0 ); +return (netdev->features &NETIF_F_IP_CSUM ) !=0 ; }static int igbvf_set_tx_csum (struct net_device *netdev,u32 data)
drivers/net/igbvf/netdev.c +1 -1
@@ -845,7 +845,7 @@ static bool igbvf_clean_tx_irq(struct igbvf_ring *tx_ring) } adapter->net_stats.tx_bytes += total_bytes; adapter->net_stats.tx_packets += total_packets; -return (count < tx_ring->count); +return count < tx_ring->count; }static irqreturn_t igbvf_msix_other (int irq,void *data)
drivers/net/irda/donauboe.c +2 -2
@@ -217,7 +217,7 @@ toshoboe_checkfcs (unsigned char *buf, int len)for (i =0 ; i < len; ++i) fcs.value =irda_fcs (fcs.value, *(buf++)); -return (fcs.value ==GOOD_FCS ); +return fcs.value ==GOOD_FCS ; }/***********************************************************************/
@@ -759,7 +759,7 @@ toshoboe_maketestpacket (unsigned char *buf, int badcrc, int fir)if (fir) {memset (buf,0 ,TT_LEN ); -return (TT_LEN ); +return TT_LEN ; } fcs.value =INIT_FCS ;
drivers/net/irda/irda-usb.c +1 -1
@@ -1514,7 +1514,7 @@ static inline int irda_usb_parse_endpoints(struct irda_usb_cb *self, struct usb_IRDA_DEBUG (0 ,"%s(), And our endpoints are : in=%02X, out=%02X (%d), int=%02X\n" , __func__, self->bulk_in_ep, self->bulk_out_ep, self->bulk_out_mtu, self->bulk_int_ep); -return ((self->bulk_in_ep !=0 ) && (self->bulk_out_ep !=0 )); +return (self->bulk_in_ep !=0 ) && (self->bulk_out_ep !=0 ); }#ifdef IU_DUMP_CLASS_DESC
drivers/net/irda/nsc-ircc.c +1 -1
@@ -1348,7 +1348,7 @@ static __u8 nsc_ircc_change_speed(struct nsc_ircc_cb *self, __u32 speed)outb (bank, iobase+BSR );/* Make sure interrupt handlers keep the proper interrupt mask */ -return (ier); +return ier; }/*
drivers/net/irda/sir_dev.c +1 -1
@@ -336,7 +336,7 @@ static int sirdev_is_receiving(struct sir_dev *dev)if (!atomic_read (&dev->enable_rx))return 0 ; -return (dev->rx_buff.state !=OUTSIDE_FRAME ); +return dev->rx_buff.state !=OUTSIDE_FRAME ; }int sirdev_set_dongle (struct sir_dev *dev,IRDA_DONGLE type)
drivers/net/irda/smsc-ircc2.c +1 -1
@@ -2051,7 +2051,7 @@ static int smsc_ircc_sir_write(int iobase, int fifo_size, __u8 *buf, int len)*/ static int smsc_ircc_is_receiving (struct smsc_ircc_cb *self) { -return (self->rx_buff.state !=OUTSIDE_FRAME ); +return self->rx_buff.state !=OUTSIDE_FRAME ; }
drivers/net/irda/stir4200.c +1 -1
@@ -219,7 +219,7 @@ static inline int read_reg(struct stir_cb *stir, __u16 reg,static inline int isfir (u32 speed) { -return (speed ==4000000 ); +return speed ==4000000 ; }/*
drivers/net/irda/via-ircc.h +1 -1
@@ -238,7 +238,7 @@ static void WriteLPCReg(int iRegNum, unsigned char iVal)static __u8 ReadReg (unsigned int BaseAddr,int iRegNum) { -return ((__u8 )inb (BaseAddr + iRegNum)); +return (__u8 )inb (BaseAddr + iRegNum); }static void WriteReg (unsigned int BaseAddr,int iRegNum,unsigned char iVal)
drivers/net/irda/vlsi_ir.h +1 -1
@@ -595,7 +595,7 @@ struct ring_descr {static inline int rd_is_active (struct ring_descr *rd) { -return ((rd->hw->rd_status &RD_ACTIVE ) !=0 ); +return (rd->hw->rd_status &RD_ACTIVE ) !=0 ; }static inline void rd_activate (struct ring_descr *rd)
drivers/net/ixgb/ixgb_ee.c +16 -16
@@ -296,12 +296,12 @@ ixgb_wait_eeprom_command(struct ixgb_hw *hw) eecd_reg =IXGB_READ_REG (hw,EECD );if (eecd_reg &IXGB_EECD_DO ) -return (true); +return true;udelay (50 ); }ASSERT (0 ); -return (false); +return false; }/******************************************************************************
@@ -327,9 +327,9 @@ ixgb_validate_eeprom_checksum(struct ixgb_hw *hw) checksum +=ixgb_read_eeprom (hw, i);if (checksum == (u16 )EEPROM_SUM ) -return (true); +return true;else -return (false); +return false; }/******************************************************************************
@@ -439,7 +439,7 @@ ixgb_read_eeprom(struct ixgb_hw *hw,/* End this read operation */ ixgb_standby_eeprom (hw); -return (data); +return data; }/******************************************************************************
@@ -476,16 +476,16 @@ ixgb_get_eeprom_data(struct ixgb_hw *hw)/* clear the init_ctrl_reg_1 to signify that the cache is * invalidated */ ee_map->init_ctrl_reg_1 =cpu_to_le16 (EEPROM_ICW1_SIGNATURE_CLEAR ); -return (false); +return false; }if ((ee_map->init_ctrl_reg_1 &cpu_to_le16 (EEPROM_ICW1_SIGNATURE_MASK )) !=cpu_to_le16 (EEPROM_ICW1_SIGNATURE_VALID )) {pr_debug ("Signature invalid\n" ); -return (false); +return false; } -return (true); +return true; }/******************************************************************************
@@ -505,7 +505,7 @@ ixgb_check_and_get_eeprom_data (struct ixgb_hw* hw)if ((ee_map->init_ctrl_reg_1 &cpu_to_le16 (EEPROM_ICW1_SIGNATURE_MASK )) ==cpu_to_le16 (EEPROM_ICW1_SIGNATURE_VALID )) { -return (true); +return true; }else {return ixgb_get_eeprom_data (hw); }
@@ -526,10 +526,10 @@ ixgb_get_eeprom_word(struct ixgb_hw *hw, u16 index)if ((index <IXGB_EEPROM_SIZE ) && (ixgb_check_and_get_eeprom_data (hw) == true)) { -return (hw->eeprom[index]); +return hw->eeprom[index]; } -return (0 ); +return 0 ; }/******************************************************************************
@@ -570,10 +570,10 @@ u32 ixgb_get_ee_pba_number(struct ixgb_hw *hw) {if (ixgb_check_and_get_eeprom_data (hw) == true) -return (le16_to_cpu (hw->eeprom[EEPROM_PBA_1_2_REG ]) - | (le16_to_cpu (hw->eeprom[EEPROM_PBA_3_4_REG ])<<16 )); +return le16_to_cpu (hw->eeprom[EEPROM_PBA_1_2_REG ]) + | (le16_to_cpu (hw->eeprom[EEPROM_PBA_3_4_REG ])<<16 ); -return (0 ); +return 0 ; }
@@ -591,8 +591,8 @@ ixgb_get_ee_device_id(struct ixgb_hw *hw)struct ixgb_ee_map_type *ee_map = (struct ixgb_ee_map_type *)hw->eeprom;if (ixgb_check_and_get_eeprom_data (hw) == true) -return (le16_to_cpu (ee_map->device_id)); +return le16_to_cpu (ee_map->device_id); -return (0 ); +return 0 ; }
drivers/net/ixgb/ixgb_ethtool.c +1 -1
@@ -410,7 +410,7 @@ static int ixgb_get_eeprom_len(struct net_device *netdev) {/* return size in bytes */ -return (IXGB_EEPROM_SIZE <<1 ); +return IXGB_EEPROM_SIZE <<1 ; } static int
drivers/net/ixgb/ixgb_hw.c +9 -9
@@ -167,7 +167,7 @@ ixgb_adapter_stop(struct ixgb_hw *hw)/* Clear any pending interrupt events. */ icr_reg =IXGB_READ_REG (hw,ICR ); -return (ctrl_reg &IXGB_CTRL0_RST ); +return ctrl_reg &IXGB_CTRL0_RST ; }
@@ -209,7 +209,7 @@ ixgb_identify_xpak_vendor(struct ixgb_hw *hw) xpak_vendor = ixgb_xpak_vendor_infineon; } -return (xpak_vendor); +return xpak_vendor; }/******************************************************************************
@@ -273,7 +273,7 @@ ixgb_identify_phy(struct ixgb_hw *hw)if (hw->subsystem_vendor_id ==SUN_SUBVENDOR_ID ) phy_type = ixgb_phy_type_bcm; -return (phy_type); +return phy_type; }/******************************************************************************
@@ -340,7 +340,7 @@ ixgb_init_hw(struct ixgb_hw *hw)*/ if (!mac_addr_valid (hw->curr_mac_addr)) {pr_debug ("MAC address invalid after ixgb_init_rx_addrs\n" ); -return (false); +return false; }/* tell the routines in this file they can access hardware again */
@@ -366,7 +366,7 @@ ixgb_init_hw(struct ixgb_hw *hw)/* 82597EX errata: Call check-for-link in case lane deskew is locked */ ixgb_check_for_link (hw); -return (status); +return status; }/******************************************************************************
@@ -531,7 +531,7 @@ ixgb_hash_mc_addr(struct ixgb_hw *hw, } hash_value &=0xFFF ; -return (hash_value); +return hash_value; }/******************************************************************************
@@ -715,7 +715,7 @@ ixgb_setup_fc(struct ixgb_hw *hw) }IXGB_WRITE_REG (hw,FCRTH , hw->fc.high_water); } -return (status); +return status; }/******************************************************************************
@@ -806,7 +806,7 @@ ixgb_read_phy_reg(struct ixgb_hw *hw,*/ data =IXGB_READ_REG (hw,MSRWD ); data >>=IXGB_MSRWD_READ_DATA_SHIFT ; -return ((u16 ) data); +return (u16 )data; }/******************************************************************************
@@ -1140,7 +1140,7 @@ mac_addr_valid(u8 *mac_addr)pr_debug ("MAC address is all zeros\n" ); is_valid = false; } -return (is_valid); +return is_valid; }/******************************************************************************
drivers/net/ixgbe/ixgbe_ethtool.c +3 -3
@@ -401,7 +401,7 @@ static int ixgbe_set_pauseparam(struct net_device *netdev,static u32 ixgbe_get_rx_csum (struct net_device *netdev) {struct ixgbe_adapter *adapter =netdev_priv (netdev); -return (adapter->flags &IXGBE_FLAG_RX_CSUM_ENABLED ); +return adapter->flags &IXGBE_FLAG_RX_CSUM_ENABLED ; }static int ixgbe_set_rx_csum (struct net_device *netdev,u32 data)
@@ -988,8 +988,8 @@ static int ixgbe_get_sset_count(struct net_device *netdev, int sset)case ETH_SS_STATS :return IXGBE_STATS_LEN ;case ETH_SS_NTUPLE_FILTERS : -return (ETHTOOL_MAX_NTUPLE_LIST_ENTRY * -ETHTOOL_MAX_NTUPLE_STRING_PER_ENTRY ); +return ETHTOOL_MAX_NTUPLE_LIST_ENTRY * +ETHTOOL_MAX_NTUPLE_STRING_PER_ENTRY ;default :return -EOPNOTSUPP ; }
drivers/net/ixgbe/ixgbe_main.c +1 -1
@@ -826,7 +826,7 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector, tx_ring->total_packets += total_packets; tx_ring->stats.packets += total_packets; tx_ring->stats.bytes += total_bytes; -return (count < tx_ring->work_limit); +return count < tx_ring->work_limit; }#ifdef CONFIG_IXGBE_DCA
drivers/net/ixgbevf/ixgbevf_main.c +1 -1
@@ -311,7 +311,7 @@ static bool ixgbevf_clean_tx_irq(struct ixgbevf_adapter *adapter, netdev->stats.tx_bytes += total_bytes; netdev->stats.tx_packets += total_packets; -return (count < tx_ring->work_limit); +return count < tx_ring->work_limit; }/**
drivers/net/ll_temac_main.c +1 -1
@@ -494,7 +494,7 @@ static u32 temac_setoptions(struct net_device *ndev, u32 options) lp->options |= options;mutex_unlock (&lp->indirect_mutex); -return (0 ); +return 0 ; }/* Initialize temac */
drivers/net/lp486e.c +1 -1
@@ -460,7 +460,7 @@ init_rx_bufs(struct net_device *dev, int num) { } lp->rbd_tail->next = rfd->rbd;#endif -return (i); +return i; } static inline void
drivers/net/meth.c +1 -1
@@ -461,7 +461,7 @@ static int meth_tx_full(struct net_device *dev) {struct meth_private *priv =netdev_priv (dev); -return (priv->tx_count >=TX_RING_ENTRIES -1 ); +return priv->tx_count >=TX_RING_ENTRIES -1 ; }static void meth_tx_cleanup (struct net_device * dev,unsigned long int_status)
drivers/net/mlx4/en_selftest.c +1 -1
@@ -107,7 +107,7 @@ static int mlx4_en_test_loopback(struct mlx4_en_priv *priv) mlx4_en_test_loopback_exit: priv->validate_loopback =0 ; -return (!loopback_ok); +return !loopback_ok; }
drivers/net/myri10ge/myri10ge.c +3 -3
@@ -1555,12 +1555,12 @@ static irqreturn_t myri10ge_intr(int irq, void *arg)* valid since MSI-X irqs are not shared */ if ((mgp->dev->real_num_tx_queues ==1 ) && (ss != mgp->ss)) {napi_schedule (&ss->napi); -return (IRQ_HANDLED ); +return IRQ_HANDLED ; }/* make sure it is our IRQ, and that the DMA has finished */ if (unlikely (!stats->valid)) -return (IRQ_NONE ); +return IRQ_NONE ;/* low bit indicates receives are present, so schedule * napi poll handler */
@@ -1599,7 +1599,7 @@ static irqreturn_t myri10ge_intr(int irq, void *arg)myri10ge_check_statblock (mgp);put_be32 (htonl (3 ), ss->irq_claim +1 ); -return (IRQ_HANDLED ); +return IRQ_HANDLED ; } static int
drivers/net/myri_sbus.c +1 -1
@@ -735,7 +735,7 @@ static int myri_header(struct sk_buff *skb, struct net_device *dev,int i;for (i =0 ; i < dev->addr_len; i++) eth->h_dest[i] =0 ; -return (dev->hard_header_len); +return dev->hard_header_len; }if (daddr) {
drivers/net/netxen/netxen_nic_init.c +2 -2
@@ -346,7 +346,7 @@ static u32 netxen_decode_crb_addr(u32 addr)if (pci_base ==NETXEN_ADDR_ERROR )return pci_base;else -return (pci_base + offset); +return pci_base + offset; }#define NETXEN_MAX_ROM_WAIT_USEC 100
@@ -1792,7 +1792,7 @@ int netxen_process_cmd_ring(struct netxen_adapter *adapter) done = (sw_consumer == hw_consumer);spin_unlock (&adapter->tx_clean_lock); -return (done); +return done; }void
drivers/net/netxen/netxen_nic_main.c +1 -1
@@ -177,7 +177,7 @@ netxen_alloc_sds_rings(struct netxen_recv_context *recv_ctx, int count) recv_ctx->sds_rings =kzalloc (size,GFP_KERNEL ); -return (recv_ctx->sds_rings ==NULL ); +return recv_ctx->sds_rings ==NULL ; } static void
drivers/net/niu.c +8 -9
@@ -283,7 +283,7 @@ static int niu_enable_interrupts(struct niu *np, int on)static u32 phy_encode (u32 type,int port) { -return (type << (port *2 )); +return type << (port *2 ); }static u32 phy_decode (u32 val,int port)
@@ -3043,8 +3043,7 @@ static int tcam_flush_all(struct niu *np)static u64 hash_addr_regval (unsigned long index,unsigned long num_entries) { -return ((u64 )index | (num_entries ==1 ? -HASH_TBL_ADDR_AUTOINC :0 )); +return (u64 )index | (num_entries ==1 ?HASH_TBL_ADDR_AUTOINC :0 ); }#if 0
@@ -3276,7 +3275,7 @@ static u16 tcam_get_index(struct niu *np, u16 idx)/* One entry reserved for IP fragment rule */ if (idx >= (np->clas.tcam_sz -1 )) idx =0 ; -return (np->clas.tcam_top + ((idx+1 ) * np->parent->num_ports)); +return np->clas.tcam_top + ((idx+1 ) * np->parent->num_ports); }static u16 tcam_get_size (struct niu *np)
@@ -3313,7 +3312,7 @@ static unsigned int niu_hash_rxaddr(struct rx_ring_info *rp, u64 a) a >>=PAGE_SHIFT ; a ^= (a >>ilog2 (MAX_RBR_RING_SIZE )); -return (a & (MAX_RBR_RING_SIZE -1 )); +return a & (MAX_RBR_RING_SIZE -1 ); } static struct page *niu_find_rxpage(struct rx_ring_info *rp, u64 addr,
@@ -7796,11 +7795,11 @@ static int niu_get_sset_count(struct net_device *dev, int stringset)if (stringset !=ETH_SS_STATS )return -EINVAL ; -return ((np->flags &NIU_FLAGS_XMAC ? -NUM_XMAC_STAT_KEYS : -NUM_BMAC_STAT_KEYS ) + +return (np->flags &NIU_FLAGS_XMAC ? +NUM_XMAC_STAT_KEYS : +NUM_BMAC_STAT_KEYS ) + (np->num_rx_rings *NUM_RXCHAN_STAT_KEYS ) + - (np->num_tx_rings *NUM_TXCHAN_STAT_KEYS )); + (np->num_tx_rings *NUM_TXCHAN_STAT_KEYS ); } static void niu_get_ethtool_stats(struct net_device *dev,
drivers/net/niu.h +1 -2
@@ -2880,8 +2880,7 @@ struct tx_ring_info {static inline u32 niu_tx_avail (struct tx_ring_info *tp) { -return (tp->pending - - ((tp->prod - tp->cons) & (MAX_TX_RING_SIZE -1 ))); +return tp->pending - ((tp->prod - tp->cons) & (MAX_TX_RING_SIZE -1 )); }struct rxdma_mailbox {
drivers/net/pcmcia/nmclan_cs.c +1 -1
@@ -521,7 +521,7 @@ static int mace_read(mace_private *lp, unsigned int ioaddr, int reg)spin_unlock_irqrestore (&lp->bank_lock, flags);break ; } -return (data &0xFF ); +return data &0xFF ; }/* mace_read */ /* ----------------------------------------------------------------------------
drivers/net/pcmcia/smc91c92_cs.c +1 -1
@@ -815,7 +815,7 @@ static int check_sig(struct pcmcia_device *link) ((s >> 8) != (s & 0xff))) {SMC_SELECT_BANK (3 ); s =inw (ioaddr +REVISION ); -return (s &0xff ); +return s &0xff ; }if (width) {
drivers/net/pcnet32.c +2 -2
@@ -376,7 +376,7 @@ static void pcnet32_wio_reset(unsigned long addr)static int pcnet32_wio_check (unsigned long addr) {outw (88 , addr +PCNET32_WIO_RAP ); -return (inw (addr +PCNET32_WIO_RAP ) ==88 ); +return inw (addr +PCNET32_WIO_RAP ) ==88 ; }static struct pcnet32_access pcnet32_wio = {
@@ -431,7 +431,7 @@ static void pcnet32_dwio_reset(unsigned long addr)static int pcnet32_dwio_check (unsigned long addr) {outl (88 , addr +PCNET32_DWIO_RAP ); -return ((inl (addr +PCNET32_DWIO_RAP ) &0xffff ) ==88 ); +return (inl (addr +PCNET32_DWIO_RAP ) &0xffff ) ==88 ; }static struct pcnet32_access pcnet32_dwio = {
drivers/net/phy/mdio_bus.c +2 -2
@@ -260,8 +260,8 @@ static int mdio_bus_match(struct device *dev, struct device_driver *drv)struct phy_device *phydev =to_phy_device (dev);struct phy_driver *phydrv =to_phy_driver (drv); -return ((phydrv->phy_id & phydrv->phy_id_mask) == - (phydev->phy_id & phydrv->phy_id_mask)); +return (phydrv->phy_id & phydrv->phy_id_mask) == + (phydev->phy_id & phydrv->phy_id_mask); }#ifdef CONFIG_PM
drivers/net/ps3_gelic_wireless.c +3 -3
@@ -85,12 +85,12 @@ static const int bitrate_list[] = {*/ static inline int wpa2_capable (void ) { -return (0 <=ps3_compare_firmware_version (2 ,0 ,0 )); +return 0 <=ps3_compare_firmware_version (2 ,0 ,0 ); }static inline int precise_ie (void ) { -return (0 <=ps3_compare_firmware_version (2 ,2 ,0 )); +return 0 <=ps3_compare_firmware_version (2 ,2 ,0 ); }/* * post_eurus_cmd helpers
@@ -506,7 +506,7 @@ static size_t gelic_wl_synthesize_ie(u8 *buf, start[1 ] = (buf - start -2 );pr_debug ("%s: ->\n" , __func__); -return (buf - start); +return buf - start; }struct ie_item {
drivers/net/qla3xxx.c +1 -1
@@ -136,7 +136,7 @@ static int ql_sem_lock(struct ql3_adapter *qdev, u32 sem_mask, u32 sem_bits)writel ((sem_mask | sem_bits), &port_regs->CommonRegs.semaphoreReg); value =readl (&port_regs->CommonRegs.semaphoreReg); -return ((value & (sem_mask >>16 )) == sem_bits); +return (value & (sem_mask >>16 )) == sem_bits; }/*
drivers/net/qlcnic/qlcnic_main.c +1 -1
@@ -172,7 +172,7 @@ qlcnic_alloc_sds_rings(struct qlcnic_recv_context *recv_ctx, int count) recv_ctx->sds_rings =kzalloc (size,GFP_KERNEL ); -return (recv_ctx->sds_rings ==NULL ); +return recv_ctx->sds_rings ==NULL ; } static void
drivers/net/sfc/net_driver.h +1 -1
@@ -985,7 +985,7 @@ static inline int efx_rx_queue_index(struct efx_rx_queue *rx_queue)static inline struct efx_rx_buffer *efx_rx_buffer (struct efx_rx_queue *rx_queue,unsigned int index) { -return (&rx_queue->buffer[index]); +return &rx_queue->buffer[index]; }/* Set bit in a little-endian bitfield */
drivers/net/sfc/nic.c +5 -5
@@ -104,7 +104,7 @@ static inline void efx_write_buf_tbl(struct efx_nic *efx, efx_qword_t *value,static inline efx_qword_t *efx_event (struct efx_channel *channel,unsigned int index) { -return (((efx_qword_t *) (channel->eventq.addr)) + index); +return ((efx_qword_t *)channel->eventq.addr) + index; }/* See if an event is present
@@ -119,8 +119,8 @@ static inline efx_qword_t *efx_event(struct efx_channel *channel,*/ static inline int efx_event_present (efx_qword_t *event) { -return (!(EFX_DWORD_IS_ALL_ONES (event->dword[0 ]) | -EFX_DWORD_IS_ALL_ONES (event->dword[1 ]))); +return !(EFX_DWORD_IS_ALL_ONES (event->dword[0 ]) | +EFX_DWORD_IS_ALL_ONES (event->dword[1 ])); } static bool efx_masked_compare_oword(const efx_oword_t *a, const efx_oword_t *b,
@@ -347,7 +347,7 @@ void efx_nic_free_buffer(struct efx_nic *efx, struct efx_buffer *buffer)static inline efx_qword_t *efx_tx_desc (struct efx_tx_queue *tx_queue,unsigned int index) { -return (((efx_qword_t *) (tx_queue->txd.addr)) + index); +return ((efx_qword_t *)tx_queue->txd.addr) + index; }/* This writes to the TX_DESC_WPTR; write pointer for TX descriptor ring */
@@ -502,7 +502,7 @@ void efx_nic_remove_tx(struct efx_tx_queue *tx_queue)static inline efx_qword_t *efx_rx_desc (struct efx_rx_queue *rx_queue,unsigned int index) { -return (((efx_qword_t *) (rx_queue->rxd.addr)) + index); +return ((efx_qword_t *)rx_queue->rxd.addr) + index; }/* This creates an entry in the RX descriptor queue */
drivers/net/sfc/rx.c +4 -4
@@ -107,10 +107,10 @@ static inline u32 efx_rx_buf_hash(struct efx_rx_buffer *buf)return __le32_to_cpup ((const __le32 *)(buf->data -4 ));#else const u8 *data = (const u8 *)(buf->data -4 ); -return ((u32 )data[0 ] | - (u32 )data[1 ] <<8 | - (u32 )data[2 ] <<16 | - (u32 )data[3 ] <<24 ); +return (u32 )data[0 ] | + (u32 )data[1 ] <<8 | + (u32 )data[2 ] <<16 | + (u32 )data[3 ] <<24 ;#endif }
drivers/net/sis900.c +3 -3
@@ -832,7 +832,7 @@ static u16 __devinit read_eeprom(long ioaddr, int location)outl (0 , ee_addr);eeprom_delay (); -return (retval); +return retval; }/* Read and write the MII management registers using software-generated
@@ -2247,9 +2247,9 @@ static inline u16 sis900_mcast_bitnr(u8 *addr, u8 revision)/* leave 8 or 7 most siginifant bits */ if ((revision >=SIS635A_900_REV ) || (revision ==SIS900B_900_REV )) -return ((int )(crc >>24 )); +return (int )(crc >>24 );else -return ((int )(crc >>25 )); +return (int )(crc >>25 ); }/**
drivers/net/skfp/cfm.c +5 -5
@@ -542,8 +542,8 @@ static void cfm_fsm(struct s_smc *smc, int cmd)*/ int cfm_get_mac_input (struct s_smc *smc) { -return ((smc->mib.fddiSMTCF_State ==SC10_C_WRAP_B || - smc->mib.fddiSMTCF_State ==SC5_THRU_B ) ?PB :PA ) ; +return (smc->mib.fddiSMTCF_State ==SC10_C_WRAP_B || + smc->mib.fddiSMTCF_State ==SC5_THRU_B ) ?PB :PA ; }/*
@@ -553,8 +553,8 @@ int cfm_get_mac_input(struct s_smc *smc)*/ int cfm_get_mac_output (struct s_smc *smc) { -return ((smc->mib.fddiSMTCF_State ==SC10_C_WRAP_B || - smc->mib.fddiSMTCF_State ==SC4_THRU_A ) ?PB :PA ) ; +return (smc->mib.fddiSMTCF_State ==SC10_C_WRAP_B || + smc->mib.fddiSMTCF_State ==SC4_THRU_A ) ?PB :PA ; }static char path_iso[] = {
@@ -623,5 +623,5 @@ int cem_build_path(struct s_smc *smc, char *to, int path_index)LINT_USE (path_index); -return (len) ; +return len; }
drivers/net/skfp/drvfbi.c +8 -8
@@ -267,7 +267,7 @@ void timer_irq(struct s_smc *smc)int pcm_get_s_port (struct s_smc *smc) {SK_UNUSED (smc) ; -return (PS ) ; +return PS ; }/*
@@ -366,7 +366,7 @@ void sm_pm_bypass_req(struct s_smc *smc, int mode)*/ int sm_pm_bypass_present (struct s_smc *smc) { -return ( (inp (ADDR (B0_DAS )) &DAS_BYP_ST ) ? TRUE: FALSE) ; +return (inp (ADDR (B0_DAS )) &DAS_BYP_ST ) ? TRUE : FALSE; }void plc_clear_irq (struct s_smc *smc,int p)
@@ -483,9 +483,9 @@ static int is_equal_num(char comp1[], char comp2[], int num)for (i =0 ; i < num ; i++) {if (comp1[i] != comp2[i]) -return (0 ) ; +return 0 ; } -return (1 ) ; +return 1 ; }/* is_equal_num */
@@ -522,18 +522,18 @@ int set_oi_id_def(struct s_smc *smc) i++ ;break ;/* entry ok */ default : - return (1) ; /* invalid oi_status */ + return 1; /* invalid oi_status */ } }if (i ==0 ) -return (2 ) ; +return 2 ;if (!act_entries) -return (3 ) ; +return 3 ;/* ok, we have a valid OEM data base with an active entry */ smc->hw.oem_id = (struct s_oem_ids *) &oem_ids[sel_id] ; -return (0 ) ; +return 0 ; }#endif /* MULT_OEM */
drivers/net/skfp/ess.c +23 -23
174 lines not on this page · raw message
drivers/net/skfp/fplustm.c +12 -12
@@ -112,8 +112,8 @@ static u_long mac_get_tneg(struct s_smc *smc)u_long tneg ; tneg = (u_long)((long )inpw (FM_A (FM_TNEG ))<<5 ) ; -return ((u_long)((tneg + ((inpw (FM_A (FM_TMRS ))>>10 )&0x1f )) | -0xffe00000L )) ; +return (u_long)((tneg + ((inpw (FM_A (FM_TMRS ))>>10 )&0x1f )) | +0xffe00000L ); }void mac_update_counter (struct s_smc *smc)
@@ -163,7 +163,7 @@ static u_long read_mdr(struct s_smc *smc, unsigned int addr)/* is used */ p = (u_long )inpw (FM_A (FM_MDRU ))<<16 ; p += (u_long )inpw (FM_A (FM_MDRL )) ; - return(p) ; + return p; }#endif
@@ -887,7 +887,7 @@ int init_fplus(struct s_smc *smc)/* make sure all PCI settings are correct */ mac_do_pci_fix (smc) ; -return (init_mac (smc,1 )) ; +return init_mac (smc,1 );/* enable_formac(smc) ; */ }
@@ -989,7 +989,7 @@ static int init_mac(struct s_smc *smc, int all) } smc->hw.hw_state =STARTED ; -return (0 ) ; +return 0 ; }
@@ -1049,7 +1049,7 @@ void sm_ma_control(struct s_smc *smc, int mode)int sm_mac_get_tx_state (struct s_smc *smc) { -return ((inpw (FM_A (FM_STMCHN ))>>4 )&7 ) ; +return (inpw (FM_A (FM_STMCHN )) >>4 ) &7 ; }/*
@@ -1084,9 +1084,9 @@ static struct s_fpmc* mac_get_mc_table(struct s_smc *smc, }if (memcmp ((char *)&tb->a,(char *)own,6 ))continue ; -return (tb) ; +return tb; } -return (slot) ;/* return first free or NULL */ +return slot;/* return first free or NULL */ }/*
@@ -1152,12 +1152,12 @@ int mac_add_multicast(struct s_smc *smc, struct fddi_addr *addr, int can)*/ if (can &0x80 ) {if (smc->hw.fp.smt_slots_used >=SMT_MAX_MULTI ) { -return (1 ) ; +return 1 ; } }else {if (smc->hw.fp.os_slots_used >=FPMAX_MULTICAST -SMT_MAX_MULTI ) { -return (1 ) ; +return 1 ; } }
@@ -1165,7 +1165,7 @@ int mac_add_multicast(struct s_smc *smc, struct fddi_addr *addr, int can)* find empty slot */ if (!(tb =mac_get_mc_table (smc,addr,&own,0 ,can & ~0x80 ))) -return (1 ) ; +return 1 ; tb->n++ ; tb->a = own ; tb->perm = (can &0x80 ) ?1 :0 ;
@@ -1175,7 +1175,7 @@ int mac_add_multicast(struct s_smc *smc, struct fddi_addr *addr, int can)else smc->hw.fp.os_slots_used++ ; -return (0 ) ; +return 0 ; }/*
drivers/net/skfp/hwmtm.c +15 -15
@@ -232,16 +232,16 @@ u_int mac_drv_check_space(void)#ifdef COMMON_MB_POOL call_count++ ;if (call_count ==1 ) { -return (EXT_VIRT_MEM ) ; +return EXT_VIRT_MEM ; }else { -return (EXT_VIRT_MEM_2 ) ; +return EXT_VIRT_MEM_2 ; }#else -return (EXT_VIRT_MEM ) ; +return EXT_VIRT_MEM ;#endif #else -return (0 ) ; +return 0 ;#endif }
@@ -271,7 +271,7 @@ int mac_drv_init(struct s_smc *smc)if (!(smc->os.hwm.descr_p = (union s_fp_descr volatile *)mac_drv_get_desc_mem (smc,(u_int) (RXD_TXD_COUNT +1 )*sizeof (struct s_smt_fp_txd )))) { -return (1 ) ;/* no space the hwm modul can't work */ +return 1 ;/* no space the hwm modul can't work */ }/*
@@ -283,18 +283,18 @@ int mac_drv_init(struct s_smc *smc)#ifndef COMMON_MB_POOL if (!(smc->os.hwm.mbuf_pool.mb_start = (SMbuf *)mac_drv_get_space (smc,MAX_MBUF *sizeof (SMbuf)))) { -return (1 ) ;/* no space the hwm modul can't work */ +return 1 ;/* no space the hwm modul can't work */ }#else if (!mb_start) {if (!(mb_start = (SMbuf *)mac_drv_get_space (smc,MAX_MBUF *sizeof (SMbuf)))) { -return (1 ) ;/* no space the hwm modul can't work */ +return 1 ;/* no space the hwm modul can't work */ } }#endif #endif -return (0 ) ; +return 0 ; }/*
@@ -349,7 +349,7 @@ static u_long init_descr_ring(struct s_smc *smc,DRV_BUF_FLUSH (&d1->r,DDI_DMA_SYNC_FORDEV ) ; d1++; } -return (phys) ; +return phys; }static void init_txd_ring (struct s_smc *smc)
@@ -502,7 +502,7 @@ SMbuf *smt_get_mbuf(struct s_smc *smc) mb->sm_use_count =1 ; }DB_GEN ("get SMbuf: mb = %x" ,(void *)mb,0 ,3 ) ; -return (mb) ;/* May be NULL */ +return mb;/* May be NULL */ }void smt_free_mbuf (struct s_smc *smc,SMbuf *mb)
@@ -621,7 +621,7 @@ static u_long repair_txd_ring(struct s_smc *smc, struct s_smt_tx_queue *queue) t = t->txd_next ; tx_used-- ; } -return (phys) ; +return phys; }/*
@@ -673,7 +673,7 @@ static u_long repair_rxd_ring(struct s_smc *smc, struct s_smt_rx_queue *queue) r = r->rxd_next ; rx_used-- ; } -return (phys) ; +return phys; }
@@ -1595,7 +1595,7 @@ int hwm_tx_init(struct s_smc *smc, u_char fc, int frag_count, int frame_len, }DB_TX ("frame_status = %x" ,frame_status,0 ,3 ) ;NDD_TRACE ("THiE" ,frame_status,smc->os.hwm.tx_p->tx_free,0 ) ; -return (frame_status) ; +return frame_status; }/*
@@ -1764,7 +1764,7 @@ static SMbuf *get_llc_rx(struct s_smc *smc) smc->os.hwm.llc_rx_pipe = mb->sm_next ; }DB_GEN ("get_llc_rx: mb = 0x%x" ,(void *)mb,0 ,4 ) ; -return (mb) ; +return mb; }/*
@@ -1797,7 +1797,7 @@ static SMbuf *get_txd_mb(struct s_smc *smc) smc->os.hwm.txd_tx_pipe = mb->sm_next ; }DB_GEN ("get_txd_mb: mb = 0x%x" ,(void *)mb,0 ,4 ) ; -return (mb) ; +return mb; }/*
drivers/net/skfp/hwt.c +2 -2
@@ -179,7 +179,7 @@ u_long hwt_read(struct s_smc *smc)else smc->hw.t_stop = smc->hw.t_start - tr ; } -return (smc->hw.t_stop) ; +return smc->hw.t_stop; }#ifdef PCI
@@ -208,7 +208,7 @@ u_long hwt_quick_read(struct s_smc *smc)outpw (ADDR (B2_TI_CRTL ),TIM_START ) ;outpd (ADDR (B2_TI_INI ),interval) ; -return (time) ; +return time; }/************************
drivers/net/skfp/pcmplc.c +11 -11
@@ -504,7 +504,7 @@ int sm_pm_get_ls(struct s_smc *smc, int phy)#ifdef CONCENTRATOR if (!plc_is_installed (smc,phy)) -return (PC_QLS ) ; +return PC_QLS ;#endif state =inpw (PLC (phy,PL_STATUS_A )) &PL_LINE_ST ;
@@ -528,7 +528,7 @@ int sm_pm_get_ls(struct s_smc *smc, int phy)default : state =PC_LS_NONE ; } -return (state) ; +return state; }static int plc_send_bits (struct s_smc *smc,struct s_phy *phy,int len)
@@ -547,7 +547,7 @@ static int plc_send_bits(struct s_smc *smc, struct s_phy *phy, int len)#if 0 printf ("PL_PCM_SIGNAL is set\n" ) ;#endif -return (1 ) ; +return 1 ; }/* write bit[n] & length = 1 to regs */ outpw (PLC (np,PL_VECTOR_LEN ),len-1 ) ;/* len=nr-1 */
@@ -562,7 +562,7 @@ static int plc_send_bits(struct s_smc *smc, struct s_phy *phy, int len)printf ("SIGNALING bit %d .. %d\n" ,phy->bitn,phy->bitn+len-1 ) ;#endif #endif -return (0 ) ; +return 0 ; }/*
@@ -1590,12 +1590,12 @@ int pcm_status_twisted(struct s_smc *smc) {int twist =0 ;if (smc->s.sas !=SMT_DAS ) -return (0 ) ; +return 0 ;if (smc->y[PA ].twisted && (smc->y[PA ].mib->fddiPORTPCMState ==PC8_ACTIVE )) twist |=1 ;if (smc->y[PB ].twisted && (smc->y[PB ].mib->fddiPORTPCMState ==PC8_ACTIVE )) twist |=2 ; -return (twist) ; +return twist; }/*
@@ -1636,9 +1636,9 @@ int pcm_rooted_station(struct s_smc *smc)for (n =0 ; n <NUMPHYS ; n++) {if (smc->y[n].mib->fddiPORTPCMState ==PC8_ACTIVE && smc->y[n].mib->fddiPORTNeighborType ==TM ) -return (0 ) ; +return 0 ; } -return (1 ) ; +return 1 ; }/*
@@ -1915,7 +1915,7 @@ int get_pcm_state(struct s_smc *smc, int np)case PL_PC9 : pcs =PC_MAINT ;break ;default : pcs =PC_DISABLE ;break ; } -return (pcs) ; +return pcs; }char *get_linestate (struct s_smc *smc,int np)
@@ -1937,7 +1937,7 @@ char *get_linestate(struct s_smc *smc, int np)default : ls ="unknown" ;break ;#endif } -return (ls) ; +return ls; }char *get_pcmstate (struct s_smc *smc,int np)
@@ -1959,7 +1959,7 @@ char *get_pcmstate(struct s_smc *smc, int np)case PL_PC9 : pcs ="MAINT" ;break ;default : pcs ="UNKNOWN" ;break ; } -return (pcs) ; +return pcs; }void list_phy (struct s_smc *smc)
drivers/net/skfp/pmf.c +28 -28
171 lines not on this page · raw message
drivers/net/skfp/queue.c +1 -1
@@ -128,7 +128,7 @@ u_short smt_online(struct s_smc *smc, int on) {queue_event (smc,EVENT_ECM ,on ?EC_CONNECT :EC_DISCONNECT ) ;ev_dispatcher (smc) ; -return (smc->mib.fddiSMTCF_State) ; +return smc->mib.fddiSMTCF_State; }/*
drivers/net/skfp/skfddi.c +16 -16
@@ -440,7 +440,7 @@ static int skfp_driver_init(struct net_device *dev)smt_reset_defaults (smc,0 ); -return (0 ); +return 0 ; fail:if (bp->SharedMemAddr) {
@@ -516,7 +516,7 @@ static int skfp_open(struct net_device *dev)mac_drv_rx_mode (smc,RX_DISABLE_PROMISC );netif_start_queue (dev); -return (0 ); +return 0 ; }// skfp_open
@@ -565,7 +565,7 @@ static int skfp_close(struct net_device *dev)skb_queue_purge (&bp->SendSkbQueue); bp->QueueSkb =MAX_TX_QUEUE_LEN ; -return (0 ); +return 0 ; }// skfp_close
@@ -794,7 +794,7 @@ static struct net_device_stats *skfp_ctl_get_stats(struct net_device *dev) bp->stats.port_lem_cts[1 ] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[1 ].ls;#endif -return ((struct net_device_stats *) &bp->os.MacStat); +return (struct net_device_stats *)&bp->os.MacStat; }// ctl_get_stat
@@ -932,7 +932,7 @@ static int skfp_ctl_set_mac_address(struct net_device *dev, void *addr)ResetAdapter (smc);spin_unlock_irqrestore (&bp->DriverLock, Flags); -return (0 );/* always return zero */ +return 0 ;/* always return zero */ }// skfp_ctl_set_mac_address
@@ -1313,7 +1313,7 @@ void *mac_drv_get_space(struct s_smc *smc, unsigned int size)if ((smc->os.SharedMemHeap + size) > smc->os.SharedMemSize) {printk ("Unexpected SMT memory size requested: %d\n" , size); -return (NULL ); +return NULL ; } smc->os.SharedMemHeap += size;// Move heap pointer.
@@ -1322,7 +1322,7 @@ void *mac_drv_get_space(struct s_smc *smc, unsigned int size)pr_debug ("bus addr: %lx\n" , (ulong) (smc->os.SharedMemDMA + ((char *) virt - (char *)smc->os.SharedMemAddr))); -return (virt); +return virt; }// mac_drv_get_space
@@ -1363,9 +1363,9 @@ void *mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size)if (!mac_drv_get_space (smc, size)) {printk ("fddi: Unable to align descriptor memory.\n" ); -return (NULL ); +return NULL ; } -return (virt + size); +return virt + size; }// mac_drv_get_desc_mem
@@ -1384,8 +1384,8 @@ void *mac_drv_get_desc_mem(struct s_smc *smc, unsigned int size)************************/ unsigned long mac_drv_virt2phys (struct s_smc *smc,void *virt) { -return (smc->os.SharedMemDMA + - ((char *) virt - (char *)smc->os.SharedMemAddr)); +return smc->os.SharedMemDMA + + ((char *)virt - (char *)smc->os.SharedMemAddr); }// mac_drv_virt2phys
@@ -1419,8 +1419,8 @@ unsigned long mac_drv_virt2phys(struct s_smc *smc, void *virt)************************/ u_long dma_master (struct s_smc * smc,void *virt,int len,int flag) { -return (smc->os.SharedMemDMA + - ((char *) virt - (char *)smc->os.SharedMemAddr)); +return smc->os.SharedMemDMA + + ((char *)virt - (char *)smc->os.SharedMemAddr); }// dma_master
@@ -1904,12 +1904,12 @@ int mac_drv_rx_init(struct s_smc *smc, int len, int fc,pr_debug ("fddi: Discard invalid local SMT frame\n" );pr_debug (" len=%d, la_len=%d, (ULONG) look_ahead=%08lXh.\n" , len, la_len, (unsigned long ) look_ahead); -return (0 ); +return 0 ; } skb =alloc_skb (len +3 ,GFP_ATOMIC );if (!skb) {pr_debug ("fddi: Local SMT: skb memory exhausted.\n" ); -return (0 ); +return 0 ; }skb_reserve (skb,3 );skb_put (skb, len);
@@ -1919,7 +1919,7 @@ int mac_drv_rx_init(struct s_smc *smc, int len, int fc, skb->protocol =fddi_type_trans (skb, smc->os.dev);netif_rx (skb); -return (0 ); +return 0 ; }// mac_drv_rx_init
drivers/net/skfp/smt.c +45 -45
244 lines not on this page · raw message
drivers/net/skfp/smtdef.c +2 -2
@@ -303,7 +303,7 @@ int smt_set_mac_opvalues(struct s_smc *smc)FDDI_SMT_EVENT , (u_long )FDDI_REMOTE_T_REQ , smt_get_event_word(smc)); } -return (st) ; +return st; }void smt_fixup_mib (struct s_smc *smc)
@@ -350,6 +350,6 @@ static int set_min_max(int maxflag, u_long mib, u_long limit, u_long *oper) *oper = limit ; else *oper = mib ; -return (old != *oper) ; +return old != *oper; }
drivers/net/skfp/smtinit.c +1 -1
@@ -120,6 +120,6 @@ int init_smt(struct s_smc *smc, u_char *mac_addr)PNMI_INIT (smc) ;/* PNMI initialization */ -return (0 ) ; +return 0 ; }
drivers/net/skfp/srf.c +1 -1
@@ -165,7 +165,7 @@ static struct s_srf_evc *smt_get_evc(struct s_smc *smc, int code, int index)for (i =0 , evc = smc->evcs ; (unsigned ) i <MAX_EVCS ; i++, evc++) {if (evc->evc_code == code && evc->evc_index == index) -return (evc) ; +return evc; }return NULL ; }
drivers/net/slip.c +1 -1
@@ -944,7 +944,7 @@ static int slip_esc(unsigned char *s, unsigned char *d, int len) } } *ptr++ =END ; -return (ptr - d); +return ptr - d; }static void slip_unesc (struct slip *sl,unsigned char s)
drivers/net/smsc911x.c +2 -2
@@ -123,8 +123,8 @@ static inline u32 __smsc911x_reg_read(struct smsc911x_data *pdata, u32 reg)return readl (pdata->ioaddr + reg);if (pdata->config.flags &SMSC911X_USE_16BIT ) -return ((readw (pdata->ioaddr + reg) &0xFFFF ) | - ((readw (pdata->ioaddr + reg +2 ) &0xFFFF ) <<16 )); +return (readw (pdata->ioaddr + reg) &0xFFFF ) | + ((readw (pdata->ioaddr + reg +2 ) &0xFFFF ) <<16 );BUG ();return 0 ;
drivers/net/sun3lance.c +2 -2
@@ -436,7 +436,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 |CSR0_STRT |CSR0_INEA ;
@@ -445,7 +445,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 ; }
drivers/net/sunbmac.c +1 -1
@@ -1063,7 +1063,7 @@ static u32 bigmac_get_link(struct net_device *dev) bp->sw_bmsr =bigmac_tcvr_read (bp, bp->tregs,BIGMAC_BMSR );spin_unlock_irq (&bp->lock); -return (bp->sw_bmsr &BMSR_LSTATUS ); +return bp->sw_bmsr &BMSR_LSTATUS ; }static const struct ethtool_ops bigmac_ethtool_ops = {
drivers/net/sungem_phy.c +1 -1
@@ -88,7 +88,7 @@ static int reset_one_mii_phy(struct mii_phy* phy, int phy_id)if ((val &BMCR_ISOLATE ) && limit >0 )__phy_write (phy, phy_id,MII_BMCR , val & ~BMCR_ISOLATE ); -return (limit <=0 ); +return limit <=0 ; }static int bcm5201_init (struct mii_phy * phy)
drivers/net/sunhme.c +1 -1
@@ -2497,7 +2497,7 @@ static u32 hme_get_link(struct net_device *dev) hp->sw_bmcr =happy_meal_tcvr_read (hp, hp->tcvregs,MII_BMCR );spin_unlock_irq (&hp->happy_lock); -return (hp->sw_bmsr &BMSR_LSTATUS ); +return hp->sw_bmsr &BMSR_LSTATUS ; }static const struct ethtool_ops hme_ethtool_ops = {
drivers/net/sunqe.c +1 -1
@@ -711,7 +711,7 @@ static u32 qe_get_link(struct net_device *dev) phyconfig =sbus_readb (mregs +MREGS_PHYCONFIG );spin_unlock_irq (&qep->lock); -return (phyconfig &MREGS_PHYCONFIG_LSTAT ); +return phyconfig &MREGS_PHYCONFIG_LSTAT ; }static const struct ethtool_ops qe_ethtool_ops = {
drivers/net/tc35815.c +1 -1
@@ -1167,7 +1167,7 @@ static void print_eth(const u8 *add)static int tc35815_tx_full (struct net_device *dev) {struct tc35815_local *lp =netdev_priv (dev); -return ((lp->tfd_start +1 ) %TX_FD_NUM == lp->tfd_end); +return (lp->tfd_start +1 ) %TX_FD_NUM == lp->tfd_end; }static void tc35815_restart (struct net_device *dev)
drivers/net/tg3.c +2 -3
@@ -5389,8 +5389,7 @@ static inline int tg3_4g_overflow_test(dma_addr_t mapping, int len) {u32 base = (u32 ) mapping &0xffffffff ; -return ((base >0xffffdcc0 ) && - (base + len +8 < base)); +return (base >0xffffdcc0 ) && (base + len +8 < base); }/* Test for DMA addresses > 40-bit */
@@ -5399,7 +5398,7 @@ static inline int tg3_40bit_overflow_test(struct tg3 *tp, dma_addr_t mapping, {#if defined(CONFIG_HIGHMEM ) && (BITS_PER_LONG ==64 )if (tp->tg3_flags &TG3_FLAG_40BIT_DMA_BUG ) -return (((u64 ) mapping + len) >DMA_BIT_MASK (40 )); +return ((u64 )mapping + len) >DMA_BIT_MASK (40 );return 0 ;#else return 0 ;
drivers/net/tlan.c +1 -1
@@ -3187,7 +3187,7 @@ static int TLan_EeSendByte( u16 io_base, u8 data, int stop )TLan_SetBit (TLAN_NET_SIO_EDATA , sio ); } -return ( err ); +return err; }/* TLan_EeSendByte */
drivers/net/tlan.h +5 -5
@@ -442,7 +442,7 @@ typedef struct tlan_private_tag {static inline u8 TLan_DioRead8 (u16 base_addr,u16 internal_addr) {outw (internal_addr, base_addr +TLAN_DIO_ADR ); -return (inb ((base_addr +TLAN_DIO_DATA ) + (internal_addr &0x3 ))); +return inb ((base_addr +TLAN_DIO_DATA ) + (internal_addr &0x3 )); }/* TLan_DioRead8 */
@@ -452,7 +452,7 @@ static inline u8 TLan_DioRead8(u16 base_addr, u16 internal_addr)static inline u16 TLan_DioRead16 (u16 base_addr,u16 internal_addr) {outw (internal_addr, base_addr +TLAN_DIO_ADR ); -return (inw ((base_addr +TLAN_DIO_DATA ) + (internal_addr &0x2 ))); +return inw ((base_addr +TLAN_DIO_DATA ) + (internal_addr &0x2 )); }/* TLan_DioRead16 */
@@ -462,7 +462,7 @@ static inline u16 TLan_DioRead16(u16 base_addr, u16 internal_addr)static inline u32 TLan_DioRead32 (u16 base_addr,u16 internal_addr) {outw (internal_addr, base_addr +TLAN_DIO_ADR ); -return (inl (base_addr +TLAN_DIO_DATA )); +return inl (base_addr +TLAN_DIO_DATA ); }/* TLan_DioRead32 */
@@ -506,7 +506,7 @@ static inline void TLan_DioWrite32(u16 base_addr, u16 internal_addr, u32 data)* * The original code was: * -* u32 xor( u32 a, u32 b ) { return ( ( a && ! b ) || ( ! a && b ) ); } +* u32 xor( u32 a, u32 b ) { return ( a && ! b ) || ( ! a && b ); } * * #define XOR8( a, b, c, d, e, f, g, h ) \ * xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) )
@@ -537,6 +537,6 @@ static inline u32 TLan_HashFunc( const u8 *a ) hash ^= ((a[2 ]^a[5 ])<<4 );/* & 060 */ hash ^= ((a[2 ]^a[5 ])>>2 );/* & 077 */ - return (hash & 077); + return hash & 077; }#endif
drivers/net/tokenring/proteon.c +1 -1
@@ -110,7 +110,7 @@ static int __init proteon_probe1(struct net_device *dev, int ioaddr) } dev->base_addr = ioaddr; -return (0 ); +return 0 ; nodev:release_region (ioaddr,PROTEON_IO_EXTENT );return -ENODEV ;
drivers/net/tokenring/smctr.c +252 -249
289 lines not on this page · raw message
drivers/net/tokenring/tms380tr.c +29 -29
58 lines not on this page · raw message
drivers/net/wan/dlci.c +22 -21
43 lines not on this page · raw message
drivers/net/wan/sdla.c +56 -54
110 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.
David Miller
maintainerRe: [PATCH net-next2.6] drivers/net: more return operator cleanup
From: Joe Perches <[email protected]>
Date: Fri, 24 Sep 2010 17:03:34 -0700
Quoted 11 lines
Change "return (EXPR);" to "return EXPR;"
return is not a function, parentheses are not required.
drivers/net/wirelessexcluded.
Most whitespace errors on same line as return fixed.Done via script with some manual multi-line aligning. Compile tested x86 only, not all files compiled.
Signed-off-by Joe Perches <[email protected]>
Joe, you're really starting to tick me off.
Why in the world are you subsuming this set of changes which Eric Dumazet has already made already, and on top of it not giving him any credit in the commit message?
And you're doing this after bugging the crap out of me by asking me to hurry up with applying Eric's patch in a totally inappropriate private email?
You have to be joking.
Look, if there is anything in my queue in patchwork, it means I am backlogged.
And when I'm backlogged I prioritize. And how I prioritize to get my head back above water and on top of the queue again is my business.
The last thing you should do is try to preempt other things like important crash fixes by asking me to hurry up with a cleanup patch.