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/tokenring | |
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/tokenring')
-rw-r--r-- | drivers/net/tokenring/madgemc.c | 12 | ||||
-rw-r--r-- | drivers/net/tokenring/smctr.c | 2 | ||||
-rw-r--r-- | drivers/net/tokenring/tms380tr.c | 47 |
3 files changed, 0 insertions, 61 deletions
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c index 53f631ebb162..785ad1a2157b 100644 --- a/drivers/net/tokenring/madgemc.c +++ b/drivers/net/tokenring/madgemc.c | |||
@@ -109,7 +109,6 @@ static void madgemc_sifwriteb(struct net_device *dev, unsigned short val, unsign | |||
109 | SIFWRITEB(val, reg); | 109 | SIFWRITEB(val, reg); |
110 | madgemc_setregpage(dev, 0); | 110 | madgemc_setregpage(dev, 0); |
111 | } | 111 | } |
112 | return; | ||
113 | } | 112 | } |
114 | 113 | ||
115 | /* | 114 | /* |
@@ -140,7 +139,6 @@ static void madgemc_sifwritew(struct net_device *dev, unsigned short val, unsign | |||
140 | SIFWRITEW(val, reg); | 139 | SIFWRITEW(val, reg); |
141 | madgemc_setregpage(dev, 0); | 140 | madgemc_setregpage(dev, 0); |
142 | } | 141 | } |
143 | return; | ||
144 | } | 142 | } |
145 | 143 | ||
146 | static struct net_device_ops madgemc_netdev_ops __read_mostly; | 144 | static struct net_device_ops madgemc_netdev_ops __read_mostly; |
@@ -505,8 +503,6 @@ static void madgemc_setregpage(struct net_device *dev, int page) | |||
505 | dev->base_addr + MC_CONTROL_REG1); | 503 | dev->base_addr + MC_CONTROL_REG1); |
506 | } | 504 | } |
507 | reg1 = inb(dev->base_addr + MC_CONTROL_REG1); | 505 | reg1 = inb(dev->base_addr + MC_CONTROL_REG1); |
508 | |||
509 | return; | ||
510 | } | 506 | } |
511 | 507 | ||
512 | /* | 508 | /* |
@@ -527,8 +523,6 @@ static void madgemc_setsifsel(struct net_device *dev, int val) | |||
527 | dev->base_addr + MC_CONTROL_REG0); | 523 | dev->base_addr + MC_CONTROL_REG0); |
528 | } | 524 | } |
529 | reg0 = inb(dev->base_addr + MC_CONTROL_REG0); | 525 | reg0 = inb(dev->base_addr + MC_CONTROL_REG0); |
530 | |||
531 | return; | ||
532 | } | 526 | } |
533 | 527 | ||
534 | /* | 528 | /* |
@@ -550,8 +544,6 @@ static void madgemc_setint(struct net_device *dev, int val) | |||
550 | outb(reg1 | MC_CONTROL_REG1_SINTEN, | 544 | outb(reg1 | MC_CONTROL_REG1_SINTEN, |
551 | dev->base_addr + MC_CONTROL_REG1); | 545 | dev->base_addr + MC_CONTROL_REG1); |
552 | } | 546 | } |
553 | |||
554 | return; | ||
555 | } | 547 | } |
556 | 548 | ||
557 | /* | 549 | /* |
@@ -594,8 +586,6 @@ static void madgemc_chipset_close(struct net_device *dev) | |||
594 | madgemc_setint(dev, 0); | 586 | madgemc_setint(dev, 0); |
595 | /* unmap SIF registers */ | 587 | /* unmap SIF registers */ |
596 | madgemc_setsifsel(dev, 0); | 588 | madgemc_setsifsel(dev, 0); |
597 | |||
598 | return; | ||
599 | } | 589 | } |
600 | 590 | ||
601 | /* | 591 | /* |
@@ -656,8 +646,6 @@ static void madgemc_read_rom(struct net_device *dev, struct card_info *card) | |||
656 | /* Restore original register values */ | 646 | /* Restore original register values */ |
657 | outb(reg0, ioaddr + MC_CONTROL_REG0); | 647 | outb(reg0, ioaddr + MC_CONTROL_REG0); |
658 | outb(reg1, ioaddr + MC_CONTROL_REG1); | 648 | outb(reg1, ioaddr + MC_CONTROL_REG1); |
659 | |||
660 | return; | ||
661 | } | 649 | } |
662 | 650 | ||
663 | static int madgemc_open(struct net_device *dev) | 651 | static int madgemc_open(struct net_device *dev) |
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c index 213b9affc22a..0929fff5982c 100644 --- a/drivers/net/tokenring/smctr.c +++ b/drivers/net/tokenring/smctr.c | |||
@@ -5147,8 +5147,6 @@ static void smctr_set_multicast_list(struct net_device *dev) | |||
5147 | { | 5147 | { |
5148 | if(smctr_debug > 10) | 5148 | if(smctr_debug > 10) |
5149 | printk(KERN_DEBUG "%s: smctr_set_multicast_list\n", dev->name); | 5149 | printk(KERN_DEBUG "%s: smctr_set_multicast_list\n", dev->name); |
5150 | |||
5151 | return; | ||
5152 | } | 5150 | } |
5153 | 5151 | ||
5154 | static int smctr_set_page(struct net_device *dev, __u8 *buf) | 5152 | static int smctr_set_page(struct net_device *dev, __u8 *buf) |
diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c index 8cb126a80070..435ef7d5470f 100644 --- a/drivers/net/tokenring/tms380tr.c +++ b/drivers/net/tokenring/tms380tr.c | |||
@@ -325,8 +325,6 @@ static void tms380tr_timer_end_wait(unsigned long data) | |||
325 | tp->Sleeping = 0; | 325 | tp->Sleeping = 0; |
326 | wake_up_interruptible(&tp->wait_for_tok_int); | 326 | wake_up_interruptible(&tp->wait_for_tok_int); |
327 | } | 327 | } |
328 | |||
329 | return; | ||
330 | } | 328 | } |
331 | 329 | ||
332 | /* | 330 | /* |
@@ -460,8 +458,6 @@ static void tms380tr_init_net_local(struct net_device *dev) | |||
460 | tp->RplHead = &tp->Rpl[0]; | 458 | tp->RplHead = &tp->Rpl[0]; |
461 | tp->RplTail = &tp->Rpl[RPL_NUM-1]; | 459 | tp->RplTail = &tp->Rpl[RPL_NUM-1]; |
462 | tp->RplTail->Status = (RX_START_FRAME | RX_END_FRAME | RX_FRAME_IRQ); | 460 | tp->RplTail->Status = (RX_START_FRAME | RX_END_FRAME | RX_FRAME_IRQ); |
463 | |||
464 | return; | ||
465 | } | 461 | } |
466 | 462 | ||
467 | /* | 463 | /* |
@@ -481,8 +477,6 @@ static void tms380tr_init_ipb(struct net_local *tp) | |||
481 | tp->ipb.DMA_Abort_Thrhld = DMA_RETRIES; | 477 | tp->ipb.DMA_Abort_Thrhld = DMA_RETRIES; |
482 | tp->ipb.SCB_Addr = 0; | 478 | tp->ipb.SCB_Addr = 0; |
483 | tp->ipb.SSB_Addr = 0; | 479 | tp->ipb.SSB_Addr = 0; |
484 | |||
485 | return; | ||
486 | } | 480 | } |
487 | 481 | ||
488 | /* | 482 | /* |
@@ -527,8 +521,6 @@ static void tms380tr_init_opb(struct net_device *dev) | |||
527 | 521 | ||
528 | tp->ocpl.ProdIDAddr[0] = LOWORD(Addr); | 522 | tp->ocpl.ProdIDAddr[0] = LOWORD(Addr); |
529 | tp->ocpl.ProdIDAddr[1] = HIWORD(Addr); | 523 | tp->ocpl.ProdIDAddr[1] = HIWORD(Addr); |
530 | |||
531 | return; | ||
532 | } | 524 | } |
533 | 525 | ||
534 | /* | 526 | /* |
@@ -543,8 +535,6 @@ static void tms380tr_open_adapter(struct net_device *dev) | |||
543 | 535 | ||
544 | tp->OpenCommandIssued = 1; | 536 | tp->OpenCommandIssued = 1; |
545 | tms380tr_exec_cmd(dev, OC_OPEN); | 537 | tms380tr_exec_cmd(dev, OC_OPEN); |
546 | |||
547 | return; | ||
548 | } | 538 | } |
549 | 539 | ||
550 | /* | 540 | /* |
@@ -554,8 +544,6 @@ static void tms380tr_open_adapter(struct net_device *dev) | |||
554 | static void tms380tr_disable_interrupts(struct net_device *dev) | 544 | static void tms380tr_disable_interrupts(struct net_device *dev) |
555 | { | 545 | { |
556 | SIFWRITEB(0, SIFACL); | 546 | SIFWRITEB(0, SIFACL); |
557 | |||
558 | return; | ||
559 | } | 547 | } |
560 | 548 | ||
561 | /* | 549 | /* |
@@ -565,8 +553,6 @@ static void tms380tr_disable_interrupts(struct net_device *dev) | |||
565 | static void tms380tr_enable_interrupts(struct net_device *dev) | 553 | static void tms380tr_enable_interrupts(struct net_device *dev) |
566 | { | 554 | { |
567 | SIFWRITEB(ACL_SINTEN, SIFACL); | 555 | SIFWRITEB(ACL_SINTEN, SIFACL); |
568 | |||
569 | return; | ||
570 | } | 556 | } |
571 | 557 | ||
572 | /* | 558 | /* |
@@ -578,8 +564,6 @@ static void tms380tr_exec_cmd(struct net_device *dev, unsigned short Command) | |||
578 | 564 | ||
579 | tp->CMDqueue |= Command; | 565 | tp->CMDqueue |= Command; |
580 | tms380tr_chk_outstanding_cmds(dev); | 566 | tms380tr_chk_outstanding_cmds(dev); |
581 | |||
582 | return; | ||
583 | } | 567 | } |
584 | 568 | ||
585 | static void tms380tr_timeout(struct net_device *dev) | 569 | static void tms380tr_timeout(struct net_device *dev) |
@@ -712,8 +696,6 @@ static void tms380tr_chk_src_addr(unsigned char *frame, unsigned char *hw_addr) | |||
712 | SRBit = frame[8] & 0x80; | 696 | SRBit = frame[8] & 0x80; |
713 | memcpy(&frame[8], hw_addr, 6); | 697 | memcpy(&frame[8], hw_addr, 6); |
714 | frame[8] |= SRBit; | 698 | frame[8] |= SRBit; |
715 | |||
716 | return; | ||
717 | } | 699 | } |
718 | 700 | ||
719 | /* | 701 | /* |
@@ -743,8 +725,6 @@ static void tms380tr_timer_chk(unsigned long data) | |||
743 | return; | 725 | return; |
744 | tp->ReOpenInProgress = 1; | 726 | tp->ReOpenInProgress = 1; |
745 | tms380tr_open_adapter(dev); | 727 | tms380tr_open_adapter(dev); |
746 | |||
747 | return; | ||
748 | } | 728 | } |
749 | 729 | ||
750 | /* | 730 | /* |
@@ -863,8 +843,6 @@ static void tms380tr_reset_interrupt(struct net_device *dev) | |||
863 | * and clear STS_SYSTEM_IRQ bit: enable adapter for further interrupts. | 843 | * and clear STS_SYSTEM_IRQ bit: enable adapter for further interrupts. |
864 | */ | 844 | */ |
865 | tms380tr_exec_sifcmd(dev, CMD_SSB_CLEAR | CMD_CLEAR_SYSTEM_IRQ); | 845 | tms380tr_exec_sifcmd(dev, CMD_SSB_CLEAR | CMD_CLEAR_SYSTEM_IRQ); |
866 | |||
867 | return; | ||
868 | } | 846 | } |
869 | 847 | ||
870 | /* | 848 | /* |
@@ -1119,8 +1097,6 @@ static void tms380tr_cmd_status_irq(struct net_device *dev) | |||
1119 | tp->MacStat.frequency_errors += tp->errorlogtable.Frequency_Error; | 1097 | tp->MacStat.frequency_errors += tp->errorlogtable.Frequency_Error; |
1120 | tp->MacStat.internal_errors += tp->errorlogtable.Internal_Error; | 1098 | tp->MacStat.internal_errors += tp->errorlogtable.Internal_Error; |
1121 | } | 1099 | } |
1122 | |||
1123 | return; | ||
1124 | } | 1100 | } |
1125 | 1101 | ||
1126 | /* | 1102 | /* |
@@ -1229,7 +1205,6 @@ static void tms380tr_set_multicast_list(struct net_device *dev) | |||
1229 | 1205 | ||
1230 | tp->ocpl.OPENOptions = OpenOptions; | 1206 | tp->ocpl.OPENOptions = OpenOptions; |
1231 | tms380tr_exec_cmd(dev, OC_MODIFY_OPEN_PARMS); | 1207 | tms380tr_exec_cmd(dev, OC_MODIFY_OPEN_PARMS); |
1232 | return; | ||
1233 | } | 1208 | } |
1234 | 1209 | ||
1235 | /* | 1210 | /* |
@@ -1247,7 +1222,6 @@ void tms380tr_wait(unsigned long time) | |||
1247 | #else | 1222 | #else |
1248 | udelay(time); | 1223 | udelay(time); |
1249 | #endif | 1224 | #endif |
1250 | return; | ||
1251 | } | 1225 | } |
1252 | 1226 | ||
1253 | /* | 1227 | /* |
@@ -1266,8 +1240,6 @@ static void tms380tr_exec_sifcmd(struct net_device *dev, unsigned int WriteValue | |||
1266 | SifStsValue = SIFREADW(SIFSTS); | 1240 | SifStsValue = SIFREADW(SIFSTS); |
1267 | } while((SifStsValue & CMD_INTERRUPT_ADAPTER) && loop_counter--); | 1241 | } while((SifStsValue & CMD_INTERRUPT_ADAPTER) && loop_counter--); |
1268 | SIFWRITEW(cmd, SIFCMD); | 1242 | SIFWRITEW(cmd, SIFCMD); |
1269 | |||
1270 | return; | ||
1271 | } | 1243 | } |
1272 | 1244 | ||
1273 | /* | 1245 | /* |
@@ -1700,8 +1672,6 @@ static void tms380tr_chk_outstanding_cmds(struct net_device *dev) | |||
1700 | 1672 | ||
1701 | /* Execute SCB and generate IRQ when done. */ | 1673 | /* Execute SCB and generate IRQ when done. */ |
1702 | tms380tr_exec_sifcmd(dev, CMD_EXECUTE | CMD_SCB_REQUEST); | 1674 | tms380tr_exec_sifcmd(dev, CMD_EXECUTE | CMD_SCB_REQUEST); |
1703 | |||
1704 | return; | ||
1705 | } | 1675 | } |
1706 | 1676 | ||
1707 | /* | 1677 | /* |
@@ -1774,8 +1744,6 @@ static void tms380tr_ring_status_irq(struct net_device *dev) | |||
1774 | tp->AdapterOpenFlag = 0; | 1744 | tp->AdapterOpenFlag = 0; |
1775 | tms380tr_open_adapter(dev); | 1745 | tms380tr_open_adapter(dev); |
1776 | } | 1746 | } |
1777 | |||
1778 | return; | ||
1779 | } | 1747 | } |
1780 | 1748 | ||
1781 | /* | 1749 | /* |
@@ -1932,8 +1900,6 @@ static void tms380tr_chk_irq(struct net_device *dev) | |||
1932 | /* Restart of firmware successful */ | 1900 | /* Restart of firmware successful */ |
1933 | tp->AdapterOpenFlag = 1; | 1901 | tp->AdapterOpenFlag = 1; |
1934 | } | 1902 | } |
1935 | |||
1936 | return; | ||
1937 | } | 1903 | } |
1938 | 1904 | ||
1939 | /* | 1905 | /* |
@@ -1988,8 +1954,6 @@ static void tms380tr_read_ram(struct net_device *dev, unsigned char *Data, | |||
1988 | /* Restore original values */ | 1954 | /* Restore original values */ |
1989 | SIFWRITEW(old_sifadx, SIFADX); | 1955 | SIFWRITEW(old_sifadx, SIFADX); |
1990 | SIFWRITEW(old_sifadr, SIFADR); | 1956 | SIFWRITEW(old_sifadr, SIFADR); |
1991 | |||
1992 | return; | ||
1993 | } | 1957 | } |
1994 | 1958 | ||
1995 | /* | 1959 | /* |
@@ -2021,8 +1985,6 @@ static void tms380tr_cancel_tx_queue(struct net_local* tp) | |||
2021 | dma_unmap_single(tp->pdev, tpl->DMABuff, tpl->Skb->len, DMA_TO_DEVICE); | 1985 | dma_unmap_single(tp->pdev, tpl->DMABuff, tpl->Skb->len, DMA_TO_DEVICE); |
2022 | dev_kfree_skb_any(tpl->Skb); | 1986 | dev_kfree_skb_any(tpl->Skb); |
2023 | } | 1987 | } |
2024 | |||
2025 | return; | ||
2026 | } | 1988 | } |
2027 | 1989 | ||
2028 | /* | 1990 | /* |
@@ -2094,7 +2056,6 @@ static void tms380tr_tx_status_irq(struct net_device *dev) | |||
2094 | 2056 | ||
2095 | if(!tp->TplFree->NextTPLPtr->BusyFlag) | 2057 | if(!tp->TplFree->NextTPLPtr->BusyFlag) |
2096 | netif_wake_queue(dev); | 2058 | netif_wake_queue(dev); |
2097 | return; | ||
2098 | } | 2059 | } |
2099 | 2060 | ||
2100 | /* | 2061 | /* |
@@ -2255,8 +2216,6 @@ static void tms380tr_rcv_status_irq(struct net_device *dev) | |||
2255 | /* Inform adapter about RPL valid. */ | 2216 | /* Inform adapter about RPL valid. */ |
2256 | tms380tr_exec_sifcmd(dev, CMD_RX_VALID); | 2217 | tms380tr_exec_sifcmd(dev, CMD_RX_VALID); |
2257 | } | 2218 | } |
2258 | |||
2259 | return; | ||
2260 | } | 2219 | } |
2261 | 2220 | ||
2262 | /* | 2221 | /* |
@@ -2269,8 +2228,6 @@ static void tms380tr_rcv_status_irq(struct net_device *dev) | |||
2269 | static void tms380tr_write_rpl_status(RPL *rpl, unsigned int Status) | 2228 | static void tms380tr_write_rpl_status(RPL *rpl, unsigned int Status) |
2270 | { | 2229 | { |
2271 | rpl->Status = Status; | 2230 | rpl->Status = Status; |
2272 | |||
2273 | return; | ||
2274 | } | 2231 | } |
2275 | 2232 | ||
2276 | /* | 2233 | /* |
@@ -2287,8 +2244,6 @@ static void tms380tr_update_rcv_stats(struct net_local *tp, unsigned char DataPt | |||
2287 | /* Test functional bit */ | 2244 | /* Test functional bit */ |
2288 | if(DataPtr[2] & GROUP_BIT) | 2245 | if(DataPtr[2] & GROUP_BIT) |
2289 | tp->MacStat.multicast++; | 2246 | tp->MacStat.multicast++; |
2290 | |||
2291 | return; | ||
2292 | } | 2247 | } |
2293 | 2248 | ||
2294 | static int tms380tr_set_mac_address(struct net_device *dev, void *addr) | 2249 | static int tms380tr_set_mac_address(struct net_device *dev, void *addr) |
@@ -2318,8 +2273,6 @@ static void tms380tr_dump(unsigned char *Data, int length) | |||
2318 | Data[j+0],Data[j+1],Data[j+2],Data[j+3], | 2273 | Data[j+0],Data[j+1],Data[j+2],Data[j+3], |
2319 | Data[j+4],Data[j+5],Data[j+6],Data[j+7]); | 2274 | Data[j+4],Data[j+5],Data[j+6],Data[j+7]); |
2320 | } | 2275 | } |
2321 | |||
2322 | return; | ||
2323 | } | 2276 | } |
2324 | #endif | 2277 | #endif |
2325 | 2278 | ||