You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
drivers/net: return operator cleanup
Change "return (EXPR);" to "return EXPR;" return is not a function, parentheses are not required. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
cb4dfe562c
commit
807540baae
+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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
+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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
|
||||
+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");
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+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... */
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
|
||||
+33
-33
@@ -1024,7 +1024,7 @@ static int __devinit dfx_driver_init(struct net_device *dev,
|
||||
&data) != DFX_K_SUCCESS) {
|
||||
printk("%s: Could not read adapter factory MAC address!\n",
|
||||
print_name);
|
||||
return(DFX_K_FAILURE);
|
||||
return DFX_K_FAILURE;
|
||||
}
|
||||
le32 = cpu_to_le32(data);
|
||||
memcpy(&bp->factory_mac_addr[0], &le32, sizeof(u32));
|
||||
@@ -1033,7 +1033,7 @@ static int __devinit dfx_driver_init(struct net_device *dev,
|
||||
&data) != DFX_K_SUCCESS) {
|
||||
printk("%s: Could not read adapter factory MAC address!\n",
|
||||
print_name);
|
||||
return(DFX_K_FAILURE);
|
||||
return DFX_K_FAILURE;
|
||||
}
|
||||
le32 = cpu_to_le32(data);
|
||||
memcpy(&bp->factory_mac_addr[4], &le32, sizeof(u16));
|
||||
@@ -1075,7 +1075,7 @@ static int __devinit dfx_driver_init(struct net_device *dev,
|
||||
if (top_v == NULL) {
|
||||
printk("%s: Could not allocate memory for host buffers "
|
||||
"and structures!\n", print_name);
|
||||
return(DFX_K_FAILURE);
|
||||
return DFX_K_FAILURE;
|
||||
}
|
||||
memset(top_v, 0, alloc_size); /* zero out memory before continuing */
|
||||
top_p = bp->kmalloced_dma; /* get physical address of buffer */
|
||||
@@ -1145,7 +1145,7 @@ static int __devinit dfx_driver_init(struct net_device *dev,
|
||||
DBG_printk("%s: Consumer block virt = %0lX, phys = %0X\n",
|
||||
print_name, (long)bp->cons_block_virt, bp->cons_block_phys);
|
||||
|
||||
return(DFX_K_SUCCESS);
|
||||
return DFX_K_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -1195,7 +1195,7 @@ static int dfx_adap_init(DFX_board_t *bp, int get_buffers)
|
||||
if (dfx_hw_dma_uninit(bp, bp->reset_type) != DFX_K_SUCCESS)
|
||||
{
|
||||
printk("%s: Could not uninitialize/reset adapter!\n", bp->dev->name);
|
||||
return(DFX_K_FAILURE);
|
||||
return DFX_K_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1229,7 +1229,7 @@ static int dfx_adap_init(DFX_board_t *bp, int get_buffers)
|
||||
NULL) != DFX_K_SUCCESS)
|
||||
{
|
||||
printk("%s: Could not set adapter burst size!\n", bp->dev->name);
|
||||
return(DFX_K_FAILURE);
|
||||
return DFX_K_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1246,7 +1246,7 @@ static int dfx_adap_init(DFX_board_t *bp, int get_buffers)
|
||||
NULL) != DFX_K_SUCCESS)
|
||||
{
|
||||
printk("%s: Could not set consumer block address!\n", bp->dev->name);
|
||||
return(DFX_K_FAILURE);
|
||||
return DFX_K_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1278,7 +1278,7 @@ static int dfx_adap_init(DFX_board_t *bp, int get_buffers)
|
||||
if (dfx_hw_dma_cmd_req(bp) != DFX_K_SUCCESS)
|
||||
{
|
||||
printk("%s: DMA command request failed!\n", bp->dev->name);
|
||||
return(DFX_K_FAILURE);
|
||||
return DFX_K_FAILURE;
|
||||
}
|
||||
|
||||
/* Set the initial values for eFDXEnable and MACTReq MIB objects */
|
||||
@@ -1294,7 +1294,7 @@ static int dfx_adap_init(DFX_board_t *bp, int get_buffers)
|
||||
if (dfx_hw_dma_cmd_req(bp) != DFX_K_SUCCESS)
|
||||
{
|
||||
printk("%s: DMA command request failed!\n", bp->dev->name);
|
||||
return(DFX_K_FAILURE);
|
||||
return DFX_K_FAILURE;
|
||||
}
|
||||
|
||||
/* Initialize adapter CAM */
|
||||
@@ -1302,7 +1302,7 @@ static int dfx_adap_init(DFX_board_t *bp, int get_buffers)
|
||||
if (dfx_ctl_update_cam(bp) != DFX_K_SUCCESS)
|
||||
{
|
||||
printk("%s: Adapter CAM update failed!\n", bp->dev->name);
|
||||
return(DFX_K_FAILURE);
|
||||
return DFX_K_FAILURE;
|
||||
}
|
||||
|
||||
/* Initialize adapter filters */
|
||||
@@ -1310,7 +1310,7 @@ static int dfx_adap_init(DFX_board_t *bp, int get_buffers)
|
||||
if (dfx_ctl_update_filters(bp) != DFX_K_SUCCESS)
|
||||
{
|
||||
printk("%s: Adapter filters update failed!\n", bp->dev->name);
|
||||
return(DFX_K_FAILURE);
|
||||
return DFX_K_FAILURE;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1328,7 +1328,7 @@ static int dfx_adap_init(DFX_board_t *bp, int get_buffers)
|
||||
printk("%s: Receive buffer allocation failed\n", bp->dev->name);
|
||||
if (get_buffers)
|
||||
dfx_rcv_flush(bp);
|
||||
return(DFX_K_FAILURE);
|
||||
return DFX_K_FAILURE;
|
||||
}
|
||||
|
||||
/* Issue START command and bring adapter to LINK_(UN)AVAILABLE state */
|
||||
@@ -1339,13 +1339,13 @@ static int dfx_adap_init(DFX_board_t *bp, int get_buffers)
|
||||
printk("%s: Start command failed\n", bp->dev->name);
|
||||
if (get_buffers)
|
||||
dfx_rcv_flush(bp);
|
||||
return(DFX_K_FAILURE);
|
||||
return DFX_K_FAILURE;
|
||||
}
|
||||
|
||||
/* Initialization succeeded, reenable PDQ interrupts */
|
||||
|
||||
dfx_port_write_long(bp, PI_PDQ_K_REG_HOST_INT_ENB, PI_HOST_INT_K_ENABLE_DEF_INTS);
|
||||
return(DFX_K_SUCCESS);
|
||||
return DFX_K_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -1434,7 +1434,7 @@ static int dfx_open(struct net_device *dev)
|
||||
|
||||
/* Set device structure info */
|
||||
netif_start_queue(dev);
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1526,7 +1526,7 @@ static int dfx_close(struct net_device *dev)
|
||||
|
||||
free_irq(dev->irq, dev);
|
||||
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -2027,7 +2027,7 @@ static struct net_device_stats *dfx_ctl_get_stats(struct net_device *dev)
|
||||
|
||||
bp->cmd_req_virt->cmd_type = PI_CMD_K_SMT_MIB_GET;
|
||||
if (dfx_hw_dma_cmd_req(bp) != DFX_K_SUCCESS)
|
||||
return((struct net_device_stats *) &bp->stats);
|
||||
return (struct net_device_stats *)&bp->stats;
|
||||
|
||||
/* Fill the bp->stats structure with the SMT MIB object values */
|
||||
|
||||
@@ -2128,7 +2128,7 @@ static struct net_device_stats *dfx_ctl_get_stats(struct net_device *dev)
|
||||
|
||||
bp->cmd_req_virt->cmd_type = PI_CMD_K_CNTRS_GET;
|
||||
if (dfx_hw_dma_cmd_req(bp) != DFX_K_SUCCESS)
|
||||
return((struct net_device_stats *) &bp->stats);
|
||||
return (struct net_device_stats *)&bp->stats;
|
||||
|
||||
/* Fill the bp->stats structure with the FDDI counter values */
|
||||
|
||||
@@ -2144,7 +2144,7 @@ static struct net_device_stats *dfx_ctl_get_stats(struct net_device *dev)
|
||||
bp->stats.port_lem_cts[0] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[0].ls;
|
||||
bp->stats.port_lem_cts[1] = bp->cmd_rsp_virt->cntrs_get.cntrs.link_errors[1].ls;
|
||||
|
||||
return((struct net_device_stats *) &bp->stats);
|
||||
return (struct net_device_stats *)&bp->stats;
|
||||
}
|
||||
|
||||
|
||||
@@ -2354,7 +2354,7 @@ static int dfx_ctl_set_mac_address(struct net_device *dev, void *addr)
|
||||
{
|
||||
DBG_printk("%s: Adapter CAM updated with new MAC address\n", dev->name);
|
||||
}
|
||||
return(0); /* always return zero */
|
||||
return 0; /* always return zero */
|
||||
}
|
||||
|
||||
|
||||
@@ -2438,8 +2438,8 @@ static int dfx_ctl_update_cam(DFX_board_t *bp)
|
||||
/* Issue command to update adapter CAM, then return */
|
||||
|
||||
if (dfx_hw_dma_cmd_req(bp) != DFX_K_SUCCESS)
|
||||
return(DFX_K_FAILURE);
|
||||
return(DFX_K_SUCCESS);
|
||||
return DFX_K_FAILURE;
|
||||
return DFX_K_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -2504,8 +2504,8 @@ static int dfx_ctl_update_filters(DFX_board_t *bp)
|
||||
/* Issue command to update adapter filters, then return */
|
||||
|
||||
if (dfx_hw_dma_cmd_req(bp) != DFX_K_SUCCESS)
|
||||
return(DFX_K_FAILURE);
|
||||
return(DFX_K_SUCCESS);
|
||||
return DFX_K_FAILURE;
|
||||
return DFX_K_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -2561,7 +2561,7 @@ static int dfx_hw_dma_cmd_req(DFX_board_t *bp)
|
||||
(status == PI_STATE_K_HALTED) ||
|
||||
(status == PI_STATE_K_DMA_UNAVAIL) ||
|
||||
(status == PI_STATE_K_UPGRADE))
|
||||
return(DFX_K_OUTSTATE);
|
||||
return DFX_K_OUTSTATE;
|
||||
|
||||
/* Put response buffer on the command response queue */
|
||||
|
||||
@@ -2599,7 +2599,7 @@ static int dfx_hw_dma_cmd_req(DFX_board_t *bp)
|
||||
udelay(100); /* wait for 100 microseconds */
|
||||
}
|
||||
if (timeout_cnt == 0)
|
||||
return(DFX_K_HW_TIMEOUT);
|
||||
return DFX_K_HW_TIMEOUT;
|
||||
|
||||
/* Bump (and wrap) the completion index and write out to register */
|
||||
|
||||
@@ -2619,14 +2619,14 @@ static int dfx_hw_dma_cmd_req(DFX_board_t *bp)
|
||||
udelay(100); /* wait for 100 microseconds */
|
||||
}
|
||||
if (timeout_cnt == 0)
|
||||
return(DFX_K_HW_TIMEOUT);
|
||||
return DFX_K_HW_TIMEOUT;
|
||||
|
||||
/* Bump (and wrap) the completion index and write out to register */
|
||||
|
||||
bp->cmd_rsp_reg.index.comp += 1;
|
||||
bp->cmd_rsp_reg.index.comp &= PI_CMD_RSP_K_NUM_ENTRIES-1;
|
||||
dfx_port_write_long(bp, PI_PDQ_K_REG_CMD_RSP_PROD, bp->cmd_rsp_reg.lword);
|
||||
return(DFX_K_SUCCESS);
|
||||
return DFX_K_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -2700,7 +2700,7 @@ static int dfx_hw_port_ctrl_req(
|
||||
udelay(100); /* wait for 100 microseconds */
|
||||
}
|
||||
if (timeout_cnt == 0)
|
||||
return(DFX_K_HW_TIMEOUT);
|
||||
return DFX_K_HW_TIMEOUT;
|
||||
|
||||
/*
|
||||
* If the address of host_data is non-zero, assume caller has supplied a
|
||||
@@ -2710,7 +2710,7 @@ static int dfx_hw_port_ctrl_req(
|
||||
|
||||
if (host_data != NULL)
|
||||
dfx_port_read_long(bp, PI_PDQ_K_REG_HOST_DATA, host_data);
|
||||
return(DFX_K_SUCCESS);
|
||||
return DFX_K_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
@@ -2800,7 +2800,7 @@ static int dfx_hw_adap_state_rd(DFX_board_t *bp)
|
||||
PI_UINT32 port_status; /* Port Status register value */
|
||||
|
||||
dfx_port_read_long(bp, PI_PDQ_K_REG_PORT_STATUS, &port_status);
|
||||
return((port_status & PI_PSTATUS_M_STATE) >> PI_PSTATUS_V_STATE);
|
||||
return (port_status & PI_PSTATUS_M_STATE) >> PI_PSTATUS_V_STATE;
|
||||
}
|
||||
|
||||
|
||||
@@ -2852,8 +2852,8 @@ static int dfx_hw_dma_uninit(DFX_board_t *bp, PI_UINT32 type)
|
||||
udelay(100); /* wait for 100 microseconds */
|
||||
}
|
||||
if (timeout_cnt == 0)
|
||||
return(DFX_K_HW_TIMEOUT);
|
||||
return(DFX_K_SUCCESS);
|
||||
return DFX_K_HW_TIMEOUT;
|
||||
return DFX_K_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user