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/stmmac/stmmac_main.c | |
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/stmmac/stmmac_main.c')
-rw-r--r-- | drivers/net/stmmac/stmmac_main.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/net/stmmac/stmmac_main.c b/drivers/net/stmmac/stmmac_main.c index 7ac6ddea989e..a31d580f306d 100644 --- a/drivers/net/stmmac/stmmac_main.c +++ b/drivers/net/stmmac/stmmac_main.c | |||
@@ -169,8 +169,6 @@ static void stmmac_verify_args(void) | |||
169 | flow_ctrl = FLOW_OFF; | 169 | flow_ctrl = FLOW_OFF; |
170 | if (unlikely((pause < 0) || (pause > 0xffff))) | 170 | if (unlikely((pause < 0) || (pause > 0xffff))) |
171 | pause = PAUSE_TIME; | 171 | pause = PAUSE_TIME; |
172 | |||
173 | return; | ||
174 | } | 172 | } |
175 | 173 | ||
176 | #if defined(STMMAC_XMIT_DEBUG) || defined(STMMAC_RX_DEBUG) | 174 | #if defined(STMMAC_XMIT_DEBUG) || defined(STMMAC_RX_DEBUG) |
@@ -184,7 +182,6 @@ static void print_pkt(unsigned char *buf, int len) | |||
184 | pr_info(" %02x", buf[j]); | 182 | pr_info(" %02x", buf[j]); |
185 | } | 183 | } |
186 | pr_info("\n"); | 184 | pr_info("\n"); |
187 | return; | ||
188 | } | 185 | } |
189 | #endif | 186 | #endif |
190 | 187 | ||
@@ -514,7 +511,6 @@ static void init_dma_desc_rings(struct net_device *dev) | |||
514 | pr_info("TX descriptor ring:\n"); | 511 | pr_info("TX descriptor ring:\n"); |
515 | display_ring(priv->dma_tx, txsize); | 512 | display_ring(priv->dma_tx, txsize); |
516 | } | 513 | } |
517 | return; | ||
518 | } | 514 | } |
519 | 515 | ||
520 | static void dma_free_rx_skbufs(struct stmmac_priv *priv) | 516 | static void dma_free_rx_skbufs(struct stmmac_priv *priv) |
@@ -529,7 +525,6 @@ static void dma_free_rx_skbufs(struct stmmac_priv *priv) | |||
529 | } | 525 | } |
530 | priv->rx_skbuff[i] = NULL; | 526 | priv->rx_skbuff[i] = NULL; |
531 | } | 527 | } |
532 | return; | ||
533 | } | 528 | } |
534 | 529 | ||
535 | static void dma_free_tx_skbufs(struct stmmac_priv *priv) | 530 | static void dma_free_tx_skbufs(struct stmmac_priv *priv) |
@@ -547,7 +542,6 @@ static void dma_free_tx_skbufs(struct stmmac_priv *priv) | |||
547 | priv->tx_skbuff[i] = NULL; | 542 | priv->tx_skbuff[i] = NULL; |
548 | } | 543 | } |
549 | } | 544 | } |
550 | return; | ||
551 | } | 545 | } |
552 | 546 | ||
553 | static void free_dma_desc_resources(struct stmmac_priv *priv) | 547 | static void free_dma_desc_resources(struct stmmac_priv *priv) |
@@ -567,8 +561,6 @@ static void free_dma_desc_resources(struct stmmac_priv *priv) | |||
567 | kfree(priv->rx_skbuff_dma); | 561 | kfree(priv->rx_skbuff_dma); |
568 | kfree(priv->rx_skbuff); | 562 | kfree(priv->rx_skbuff); |
569 | kfree(priv->tx_skbuff); | 563 | kfree(priv->tx_skbuff); |
570 | |||
571 | return; | ||
572 | } | 564 | } |
573 | 565 | ||
574 | /** | 566 | /** |
@@ -598,8 +590,6 @@ static void stmmac_dma_operation_mode(struct stmmac_priv *priv) | |||
598 | } | 590 | } |
599 | } | 591 | } |
600 | tx_coe = priv->tx_coe; | 592 | tx_coe = priv->tx_coe; |
601 | |||
602 | return; | ||
603 | } | 593 | } |
604 | 594 | ||
605 | /** | 595 | /** |
@@ -675,7 +665,6 @@ static void stmmac_tx(struct stmmac_priv *priv) | |||
675 | } | 665 | } |
676 | netif_tx_unlock(priv->dev); | 666 | netif_tx_unlock(priv->dev); |
677 | } | 667 | } |
678 | return; | ||
679 | } | 668 | } |
680 | 669 | ||
681 | static inline void stmmac_enable_irq(struct stmmac_priv *priv) | 670 | static inline void stmmac_enable_irq(struct stmmac_priv *priv) |
@@ -731,8 +720,6 @@ void stmmac_schedule(struct net_device *dev) | |||
731 | priv->xstats.sched_timer_n++; | 720 | priv->xstats.sched_timer_n++; |
732 | 721 | ||
733 | _stmmac_schedule(priv); | 722 | _stmmac_schedule(priv); |
734 | |||
735 | return; | ||
736 | } | 723 | } |
737 | 724 | ||
738 | static void stmmac_no_timer_started(unsigned int x) | 725 | static void stmmac_no_timer_started(unsigned int x) |
@@ -763,8 +750,6 @@ static void stmmac_tx_err(struct stmmac_priv *priv) | |||
763 | 750 | ||
764 | priv->dev->stats.tx_errors++; | 751 | priv->dev->stats.tx_errors++; |
765 | netif_wake_queue(priv->dev); | 752 | netif_wake_queue(priv->dev); |
766 | |||
767 | return; | ||
768 | } | 753 | } |
769 | 754 | ||
770 | 755 | ||
@@ -788,8 +773,6 @@ static void stmmac_dma_interrupt(struct stmmac_priv *priv) | |||
788 | stmmac_tx_err(priv); | 773 | stmmac_tx_err(priv); |
789 | } else if (unlikely(status == tx_hard_error)) | 774 | } else if (unlikely(status == tx_hard_error)) |
790 | stmmac_tx_err(priv); | 775 | stmmac_tx_err(priv); |
791 | |||
792 | return; | ||
793 | } | 776 | } |
794 | 777 | ||
795 | /** | 778 | /** |
@@ -1197,7 +1180,6 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv) | |||
1197 | } | 1180 | } |
1198 | priv->hw->desc->set_rx_owner(p + entry); | 1181 | priv->hw->desc->set_rx_owner(p + entry); |
1199 | } | 1182 | } |
1200 | return; | ||
1201 | } | 1183 | } |
1202 | 1184 | ||
1203 | static int stmmac_rx(struct stmmac_priv *priv, int limit) | 1185 | static int stmmac_rx(struct stmmac_priv *priv, int limit) |
@@ -1331,7 +1313,6 @@ static void stmmac_tx_timeout(struct net_device *dev) | |||
1331 | 1313 | ||
1332 | /* Clear Tx resources and restart transmitting again */ | 1314 | /* Clear Tx resources and restart transmitting again */ |
1333 | stmmac_tx_err(priv); | 1315 | stmmac_tx_err(priv); |
1334 | return; | ||
1335 | } | 1316 | } |
1336 | 1317 | ||
1337 | /* Configuration changes (passed on by ifconfig) */ | 1318 | /* Configuration changes (passed on by ifconfig) */ |
@@ -1373,7 +1354,6 @@ static void stmmac_multicast_list(struct net_device *dev) | |||
1373 | spin_lock(&priv->lock); | 1354 | spin_lock(&priv->lock); |
1374 | priv->hw->mac->set_filter(dev); | 1355 | priv->hw->mac->set_filter(dev); |
1375 | spin_unlock(&priv->lock); | 1356 | spin_unlock(&priv->lock); |
1376 | return; | ||
1377 | } | 1357 | } |
1378 | 1358 | ||
1379 | /** | 1359 | /** |
@@ -1489,8 +1469,6 @@ static void stmmac_vlan_rx_register(struct net_device *dev, | |||
1489 | spin_lock(&priv->lock); | 1469 | spin_lock(&priv->lock); |
1490 | priv->vlgrp = grp; | 1470 | priv->vlgrp = grp; |
1491 | spin_unlock(&priv->lock); | 1471 | spin_unlock(&priv->lock); |
1492 | |||
1493 | return; | ||
1494 | } | 1472 | } |
1495 | #endif | 1473 | #endif |
1496 | 1474 | ||