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: Remove unnecessary returns from void function()s
This patch removes from drivers/net/ all the unnecessary
return; statements that precede the last closing brace of
void functions.
It does not remove the returns that are immediately
preceded by a label as gcc doesn't like that.
It also does not remove null void functions with return.
Done via:
$ grep -rP --include=*.[ch] -l "return;\n}" net/ | \
xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }'
with some cleanups by hand.
Compile tested x86 allmodconfig only.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
21ce849ba5
commit
a4b770972b
@@ -726,7 +726,6 @@ static void el_receive(struct net_device *dev)
|
||||
dev->stats.rx_packets++;
|
||||
dev->stats.rx_bytes += pkt_len;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -573,7 +573,6 @@ el2_block_output(struct net_device *dev, int count,
|
||||
}
|
||||
blocked:;
|
||||
outb_p(ei_status.interface_num==0 ? ECNTRL_THIN : ECNTRL_AUI, E33G_CNTRL);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Read the 4 byte, page aligned 8390 specific header. */
|
||||
@@ -689,7 +688,6 @@ el2_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring
|
||||
}
|
||||
blocked:;
|
||||
outb_p(ei_status.interface_num == 0 ? ECNTRL_THIN : ECNTRL_AUI, E33G_CNTRL);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -764,7 +764,6 @@ static void init_82586_mem(struct net_device *dev)
|
||||
if (net_debug > 4)
|
||||
pr_debug("%s: Initialized 82586, status %04x.\n", dev->name,
|
||||
readw(shmem+iSCB_STATUS));
|
||||
return;
|
||||
}
|
||||
|
||||
static void hardware_send_packet(struct net_device *dev, void *buf, short length, short pad)
|
||||
|
||||
@@ -1037,7 +1037,6 @@ static void update_stats(struct net_device *dev)
|
||||
/* Back to window 1, and turn statistics back on. */
|
||||
EL3WINDOW(1);
|
||||
outw(StatsEnable, ioaddr + EL3_CMD);
|
||||
return;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
@@ -958,7 +958,6 @@ static void corkscrew_timer(unsigned long data)
|
||||
dev->name, media_tbl[dev->if_port].name);
|
||||
|
||||
#endif /* AUTOMEDIA */
|
||||
return;
|
||||
}
|
||||
|
||||
static void corkscrew_timeout(struct net_device *dev)
|
||||
@@ -1516,7 +1515,6 @@ static void update_stats(int ioaddr, struct net_device *dev)
|
||||
|
||||
/* We change back to window 7 (not 1) with the Vortex. */
|
||||
EL3WINDOW(7);
|
||||
return;
|
||||
}
|
||||
|
||||
/* This new version of set_rx_mode() supports v1.4 kernels.
|
||||
|
||||
@@ -1855,7 +1855,6 @@ leave_media_alone:
|
||||
mod_timer(&vp->timer, RUN_AT(next_tick));
|
||||
if (vp->deferred)
|
||||
iowrite16(FakeIntr, ioaddr + EL3_CMD);
|
||||
return;
|
||||
}
|
||||
|
||||
static void vortex_tx_timeout(struct net_device *dev)
|
||||
@@ -2798,7 +2797,6 @@ static void update_stats(void __iomem *ioaddr, struct net_device *dev)
|
||||
}
|
||||
|
||||
EL3WINDOW(old_window >> 13);
|
||||
return;
|
||||
}
|
||||
|
||||
static int vortex_nway_reset(struct net_device *dev)
|
||||
@@ -3120,7 +3118,6 @@ static void mdio_write(struct net_device *dev, int phy_id, int location, int val
|
||||
iowrite16(MDIO_ENB_IN | MDIO_SHIFT_CLK, mdio_addr);
|
||||
mdio_delay();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* ACPI: Advanced Configuration and Power Interface. */
|
||||
|
||||
@@ -619,7 +619,6 @@ static void lance_load_multicast (struct net_device *dev)
|
||||
crc = crc >> 26;
|
||||
mcast_table [crc >> 4] |= 1 << (crc & 0xf);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1224,8 +1224,6 @@ static void cp_tx_timeout(struct net_device *dev)
|
||||
netif_wake_queue(dev);
|
||||
|
||||
spin_unlock_irqrestore(&cp->lock, flags);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef BROKEN
|
||||
|
||||
@@ -627,7 +627,6 @@ static void lance_load_multicast (struct net_device *dev)
|
||||
crc = crc >> 26;
|
||||
mcast_table [crc >> 4] |= 1 << (crc & 0xf);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
static void lance_set_multicast (struct net_device *dev)
|
||||
|
||||
@@ -307,8 +307,6 @@ static void ac_reset_8390(struct net_device *dev)
|
||||
ei_status.txing = 0;
|
||||
outb(AC_ENABLE, ioaddr + AC_RESET_PORT);
|
||||
if (ei_debug > 1) printk("reset done\n");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/* Grab the 8390 specific header. Similar to the block_input routine, but
|
||||
|
||||
@@ -2919,8 +2919,6 @@ static void __devinit ace_clear(struct ace_regs __iomem *regs, u32 dest, int siz
|
||||
dest += tsize;
|
||||
size -= tsize;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -521,7 +521,6 @@ apne_block_output(struct net_device *dev, int count,
|
||||
|
||||
outb(ENISR_RDC, nic_base + NE_EN0_ISR); /* Ack intr. */
|
||||
ei_status.dmaing &= ~0x01;
|
||||
return;
|
||||
}
|
||||
|
||||
static irqreturn_t apne_interrupt(int irq, void *dev_id)
|
||||
|
||||
@@ -593,8 +593,6 @@ static void cops_load (struct net_device *dev)
|
||||
tangent_wait_reset(ioaddr);
|
||||
inb(ioaddr); /* Clear initial ready signal. */
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -701,8 +699,6 @@ static void cops_poll(unsigned long ltdev)
|
||||
/* poll 20 times per second */
|
||||
cops_timer.expires = jiffies + HZ/20;
|
||||
add_timer(&cops_timer);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -641,7 +641,6 @@ done:
|
||||
inb_p(base+7);
|
||||
inb_p(base+7);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -795,7 +795,6 @@ net_rx(struct net_device *dev)
|
||||
printk("%s: Exint Rx packet with mode %02x after %d ticks.\n",
|
||||
dev->name, inb(ioaddr + RX_MODE), i);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* The inverse routine to net_open(). */
|
||||
@@ -869,7 +868,6 @@ set_rx_mode(struct net_device *dev)
|
||||
outw(saved_bank, ioaddr + CONFIG_0);
|
||||
}
|
||||
spin_unlock_irqrestore (&lp->lock, flags);
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
@@ -263,8 +263,6 @@ static void atl1c_get_wol(struct net_device *netdev,
|
||||
wol->wolopts |= WAKE_MAGIC;
|
||||
if (adapter->wol & AT_WUFC_LNKC)
|
||||
wol->wolopts |= WAKE_PHY;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int atl1c_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
|
||||
|
||||
@@ -317,8 +317,6 @@ static void atl1c_common_task(struct work_struct *work)
|
||||
|
||||
if (adapter->work_event & ATL1C_WORK_EVENT_LINK_CHANGE)
|
||||
atl1c_check_link_status(adapter);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -338,8 +338,6 @@ static void atl1e_get_wol(struct net_device *netdev,
|
||||
wol->wolopts |= WAKE_MAGIC;
|
||||
if (adapter->wol & AT_WUFC_LNKC)
|
||||
wol->wolopts |= WAKE_PHY;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int atl1e_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
|
||||
|
||||
@@ -707,8 +707,6 @@ static void atl1e_init_ring_resources(struct atl1e_adapter *adapter)
|
||||
adapter->ring_vir_addr = NULL;
|
||||
adapter->rx_ring.desc = NULL;
|
||||
rwlock_init(&adapter->tx_ring.tx_lock);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -905,8 +903,6 @@ static inline void atl1e_configure_des_ring(const struct atl1e_adapter *adapter)
|
||||
AT_WRITE_REG(hw, REG_HOST_RXFPAGE_SIZE, rx_ring->page_size);
|
||||
/* Load all of base address above */
|
||||
AT_WRITE_REG(hw, REG_LOAD_PTR, 1);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void atl1e_configure_tx(struct atl1e_adapter *adapter)
|
||||
@@ -950,7 +946,6 @@ static inline void atl1e_configure_tx(struct atl1e_adapter *adapter)
|
||||
(((u16)hw->tpd_burst & TXQ_CTRL_NUM_TPD_BURST_MASK)
|
||||
<< TXQ_CTRL_NUM_TPD_BURST_SHIFT)
|
||||
| TXQ_CTRL_ENH_MODE | TXQ_CTRL_EN);
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void atl1e_configure_rx(struct atl1e_adapter *adapter)
|
||||
@@ -1004,7 +999,6 @@ static inline void atl1e_configure_rx(struct atl1e_adapter *adapter)
|
||||
RXQ_CTRL_CUT_THRU_EN | RXQ_CTRL_EN;
|
||||
|
||||
AT_WRITE_REG(hw, REG_RXQ_CTRL, rxq_ctrl_data);
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void atl1e_configure_dma(struct atl1e_adapter *adapter)
|
||||
@@ -1024,7 +1018,6 @@ static inline void atl1e_configure_dma(struct atl1e_adapter *adapter)
|
||||
<< DMA_CTRL_DMAW_DLY_CNT_SHIFT;
|
||||
|
||||
AT_WRITE_REG(hw, REG_DMA_CTRL, dma_ctrl_data);
|
||||
return;
|
||||
}
|
||||
|
||||
static void atl1e_setup_mac_ctrl(struct atl1e_adapter *adapter)
|
||||
|
||||
@@ -1830,8 +1830,6 @@ static void atl1_rx_checksum(struct atl1_adapter *adapter,
|
||||
adapter->hw_csum_good++;
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -3390,7 +3388,6 @@ static void atl1_get_wol(struct net_device *netdev,
|
||||
wol->wolopts = 0;
|
||||
if (adapter->wol & ATLX_WUFC_MAG)
|
||||
wol->wolopts |= WAKE_MAGIC;
|
||||
return;
|
||||
}
|
||||
|
||||
static int atl1_set_wol(struct net_device *netdev,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user