diff options
author | Joe Perches <joe@perches.com> | 2010-05-14 03:19:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-14 03:19:28 -0400 |
commit | a4b770972b8f819e408d7cc3ae9637e15bff62f6 (patch) | |
tree | 62e3c413b084c106d750cf6cc0701709cde30100 /drivers/net/benet | |
parent | 21ce849ba5cc178740c6532ba3dded852296ad91 (diff) |
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>
Diffstat (limited to 'drivers/net/benet')
-rw-r--r-- | drivers/net/benet/be_ethtool.c | 3 | ||||
-rw-r--r-- | drivers/net/benet/be_main.c | 12 |
2 files changed, 0 insertions, 15 deletions
diff --git a/drivers/net/benet/be_ethtool.c b/drivers/net/benet/be_ethtool.c index d488d52d710a..200e98515909 100644 --- a/drivers/net/benet/be_ethtool.c +++ b/drivers/net/benet/be_ethtool.c | |||
@@ -276,8 +276,6 @@ be_get_ethtool_stats(struct net_device *netdev, | |||
276 | data[i] = (et_stats[i].size == sizeof(u64)) ? | 276 | data[i] = (et_stats[i].size == sizeof(u64)) ? |
277 | *(u64 *)p: *(u32 *)p; | 277 | *(u64 *)p: *(u32 *)p; |
278 | } | 278 | } |
279 | |||
280 | return; | ||
281 | } | 279 | } |
282 | 280 | ||
283 | static void | 281 | static void |
@@ -466,7 +464,6 @@ be_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) | |||
466 | else | 464 | else |
467 | wol->wolopts = 0; | 465 | wol->wolopts = 0; |
468 | memset(&wol->sopass, 0, sizeof(wol->sopass)); | 466 | memset(&wol->sopass, 0, sizeof(wol->sopass)); |
469 | return; | ||
470 | } | 467 | } |
471 | 468 | ||
472 | static int | 469 | static int |
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index fa10f13242c3..058d7f95f5ae 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -830,7 +830,6 @@ static void skb_fill_rx_data(struct be_adapter *adapter, | |||
830 | 830 | ||
831 | done: | 831 | done: |
832 | be_rx_stats_update(adapter, pktsize, num_rcvd); | 832 | be_rx_stats_update(adapter, pktsize, num_rcvd); |
833 | return; | ||
834 | } | 833 | } |
835 | 834 | ||
836 | /* Process the RX completion indicated by rxcp when GRO is disabled */ | 835 | /* Process the RX completion indicated by rxcp when GRO is disabled */ |
@@ -884,8 +883,6 @@ static void be_rx_compl_process(struct be_adapter *adapter, | |||
884 | } else { | 883 | } else { |
885 | netif_receive_skb(skb); | 884 | netif_receive_skb(skb); |
886 | } | 885 | } |
887 | |||
888 | return; | ||
889 | } | 886 | } |
890 | 887 | ||
891 | /* Process the RX completion indicated by rxcp when GRO is enabled */ | 888 | /* Process the RX completion indicated by rxcp when GRO is enabled */ |
@@ -965,7 +962,6 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter, | |||
965 | } | 962 | } |
966 | 963 | ||
967 | be_rx_stats_update(adapter, pkt_size, num_rcvd); | 964 | be_rx_stats_update(adapter, pkt_size, num_rcvd); |
968 | return; | ||
969 | } | 965 | } |
970 | 966 | ||
971 | static struct be_eth_rx_compl *be_rx_compl_get(struct be_adapter *adapter) | 967 | static struct be_eth_rx_compl *be_rx_compl_get(struct be_adapter *adapter) |
@@ -1059,8 +1055,6 @@ static void be_post_rx_frags(struct be_adapter *adapter) | |||
1059 | /* Let be_worker replenish when memory is available */ | 1055 | /* Let be_worker replenish when memory is available */ |
1060 | adapter->rx_post_starved = true; | 1056 | adapter->rx_post_starved = true; |
1061 | } | 1057 | } |
1062 | |||
1063 | return; | ||
1064 | } | 1058 | } |
1065 | 1059 | ||
1066 | static struct be_eth_tx_compl *be_tx_compl_get(struct be_queue_info *tx_cq) | 1060 | static struct be_eth_tx_compl *be_tx_compl_get(struct be_queue_info *tx_cq) |
@@ -1622,7 +1616,6 @@ static void be_msix_enable(struct be_adapter *adapter) | |||
1622 | BE_NUM_MSIX_VECTORS); | 1616 | BE_NUM_MSIX_VECTORS); |
1623 | if (status == 0) | 1617 | if (status == 0) |
1624 | adapter->msix_enabled = true; | 1618 | adapter->msix_enabled = true; |
1625 | return; | ||
1626 | } | 1619 | } |
1627 | 1620 | ||
1628 | static void be_sriov_enable(struct be_adapter *adapter) | 1621 | static void be_sriov_enable(struct be_adapter *adapter) |
@@ -1634,7 +1627,6 @@ static void be_sriov_enable(struct be_adapter *adapter) | |||
1634 | adapter->sriov_enabled = status ? false : true; | 1627 | adapter->sriov_enabled = status ? false : true; |
1635 | } | 1628 | } |
1636 | #endif | 1629 | #endif |
1637 | return; | ||
1638 | } | 1630 | } |
1639 | 1631 | ||
1640 | static void be_sriov_disable(struct be_adapter *adapter) | 1632 | static void be_sriov_disable(struct be_adapter *adapter) |
@@ -1741,7 +1733,6 @@ static void be_irq_unregister(struct be_adapter *adapter) | |||
1741 | be_free_irq(adapter, &adapter->rx_eq); | 1733 | be_free_irq(adapter, &adapter->rx_eq); |
1742 | done: | 1734 | done: |
1743 | adapter->isr_registered = false; | 1735 | adapter->isr_registered = false; |
1744 | return; | ||
1745 | } | 1736 | } |
1746 | 1737 | ||
1747 | static int be_open(struct net_device *netdev) | 1738 | static int be_open(struct net_device *netdev) |
@@ -2620,8 +2611,6 @@ static void be_shutdown(struct pci_dev *pdev) | |||
2620 | be_setup_wol(adapter, true); | 2611 | be_setup_wol(adapter, true); |
2621 | 2612 | ||
2622 | pci_disable_device(pdev); | 2613 | pci_disable_device(pdev); |
2623 | |||
2624 | return; | ||
2625 | } | 2614 | } |
2626 | 2615 | ||
2627 | static pci_ers_result_t be_eeh_err_detected(struct pci_dev *pdev, | 2616 | static pci_ers_result_t be_eeh_err_detected(struct pci_dev *pdev, |
@@ -2703,7 +2692,6 @@ static void be_eeh_resume(struct pci_dev *pdev) | |||
2703 | return; | 2692 | return; |
2704 | err: | 2693 | err: |
2705 | dev_err(&adapter->pdev->dev, "EEH resume failed\n"); | 2694 | dev_err(&adapter->pdev->dev, "EEH resume failed\n"); |
2706 | return; | ||
2707 | } | 2695 | } |
2708 | 2696 | ||
2709 | static struct pci_error_handlers be_eeh_handlers = { | 2697 | static struct pci_error_handlers be_eeh_handlers = { |