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/wimax/i2400m | |
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/wimax/i2400m')
-rw-r--r-- | drivers/net/wimax/i2400m/control.c | 2 | ||||
-rw-r--r-- | drivers/net/wimax/i2400m/driver.c | 2 | ||||
-rw-r--r-- | drivers/net/wimax/i2400m/netdev.c | 2 | ||||
-rw-r--r-- | drivers/net/wimax/i2400m/rx.c | 7 | ||||
-rw-r--r-- | drivers/net/wimax/i2400m/sdio-rx.c | 2 | ||||
-rw-r--r-- | drivers/net/wimax/i2400m/usb-notif.c | 1 |
6 files changed, 0 insertions, 16 deletions
diff --git a/drivers/net/wimax/i2400m/control.c b/drivers/net/wimax/i2400m/control.c index 6180772dcc09..f8a9734243d0 100644 --- a/drivers/net/wimax/i2400m/control.c +++ b/drivers/net/wimax/i2400m/control.c | |||
@@ -568,7 +568,6 @@ void i2400m_msg_ack_hook(struct i2400m *i2400m, | |||
568 | } | 568 | } |
569 | break; | 569 | break; |
570 | }; | 570 | }; |
571 | return; | ||
572 | } | 571 | } |
573 | 572 | ||
574 | 573 | ||
@@ -1419,5 +1418,4 @@ void i2400m_dev_shutdown(struct i2400m *i2400m) | |||
1419 | 1418 | ||
1420 | d_fnstart(3, dev, "(i2400m %p)\n", i2400m); | 1419 | d_fnstart(3, dev, "(i2400m %p)\n", i2400m); |
1421 | d_fnend(3, dev, "(i2400m %p) = void\n", i2400m); | 1420 | d_fnend(3, dev, "(i2400m %p) = void\n", i2400m); |
1422 | return; | ||
1423 | } | 1421 | } |
diff --git a/drivers/net/wimax/i2400m/driver.c b/drivers/net/wimax/i2400m/driver.c index 94dc83c3969d..0043cc1152bd 100644 --- a/drivers/net/wimax/i2400m/driver.c +++ b/drivers/net/wimax/i2400m/driver.c | |||
@@ -711,7 +711,6 @@ out: | |||
711 | kfree(iw); | 711 | kfree(iw); |
712 | d_fnend(3, dev, "(ws %p i2400m %p reason %s) = void\n", | 712 | d_fnend(3, dev, "(ws %p i2400m %p reason %s) = void\n", |
713 | ws, i2400m, reason); | 713 | ws, i2400m, reason); |
714 | return; | ||
715 | } | 714 | } |
716 | 715 | ||
717 | 716 | ||
@@ -996,7 +995,6 @@ void __exit i2400m_driver_exit(void) | |||
996 | /* for scheds i2400m_dev_reset_handle() */ | 995 | /* for scheds i2400m_dev_reset_handle() */ |
997 | flush_scheduled_work(); | 996 | flush_scheduled_work(); |
998 | i2400m_barker_db_exit(); | 997 | i2400m_barker_db_exit(); |
999 | return; | ||
1000 | } | 998 | } |
1001 | module_exit(i2400m_driver_exit); | 999 | module_exit(i2400m_driver_exit); |
1002 | 1000 | ||
diff --git a/drivers/net/wimax/i2400m/netdev.c b/drivers/net/wimax/i2400m/netdev.c index b811c2f1f5e9..149b9f57e5cc 100644 --- a/drivers/net/wimax/i2400m/netdev.c +++ b/drivers/net/wimax/i2400m/netdev.c | |||
@@ -255,7 +255,6 @@ void i2400m_net_wake_stop(struct i2400m *i2400m) | |||
255 | kfree_skb(wake_tx_skb); | 255 | kfree_skb(wake_tx_skb); |
256 | } | 256 | } |
257 | d_fnend(3, dev, "(i2400m %p) = void\n", i2400m); | 257 | d_fnend(3, dev, "(i2400m %p) = void\n", i2400m); |
258 | return; | ||
259 | } | 258 | } |
260 | 259 | ||
261 | 260 | ||
@@ -434,7 +433,6 @@ void i2400m_tx_timeout(struct net_device *net_dev) | |||
434 | * this, there might be data pending to be sent or not... | 433 | * this, there might be data pending to be sent or not... |
435 | */ | 434 | */ |
436 | net_dev->stats.tx_errors++; | 435 | net_dev->stats.tx_errors++; |
437 | return; | ||
438 | } | 436 | } |
439 | 437 | ||
440 | 438 | ||
diff --git a/drivers/net/wimax/i2400m/rx.c b/drivers/net/wimax/i2400m/rx.c index fa2e11e5b4b9..5fa841d913b2 100644 --- a/drivers/net/wimax/i2400m/rx.c +++ b/drivers/net/wimax/i2400m/rx.c | |||
@@ -313,7 +313,6 @@ error_waiter_cancelled: | |||
313 | kfree_skb(ack_skb); | 313 | kfree_skb(ack_skb); |
314 | error_no_waiter: | 314 | error_no_waiter: |
315 | spin_unlock_irqrestore(&i2400m->rx_lock, flags); | 315 | spin_unlock_irqrestore(&i2400m->rx_lock, flags); |
316 | return; | ||
317 | } | 316 | } |
318 | 317 | ||
319 | 318 | ||
@@ -718,7 +717,6 @@ void __i2400m_roq_queue(struct i2400m *i2400m, struct i2400m_roq *roq, | |||
718 | out: | 717 | out: |
719 | d_fnend(4, dev, "(i2400m %p roq %p skb %p sn %u nsn %d) = void\n", | 718 | d_fnend(4, dev, "(i2400m %p roq %p skb %p sn %u nsn %d) = void\n", |
720 | i2400m, roq, skb, sn, nsn); | 719 | i2400m, roq, skb, sn, nsn); |
721 | return; | ||
722 | } | 720 | } |
723 | 721 | ||
724 | 722 | ||
@@ -798,7 +796,6 @@ void i2400m_roq_reset(struct i2400m *i2400m, struct i2400m_roq *roq) | |||
798 | } | 796 | } |
799 | roq->ws = 0; | 797 | roq->ws = 0; |
800 | d_fnend(2, dev, "(i2400m %p roq %p) = void\n", i2400m, roq); | 798 | d_fnend(2, dev, "(i2400m %p roq %p) = void\n", i2400m, roq); |
801 | return; | ||
802 | } | 799 | } |
803 | 800 | ||
804 | 801 | ||
@@ -837,7 +834,6 @@ void i2400m_roq_queue(struct i2400m *i2400m, struct i2400m_roq *roq, | |||
837 | } | 834 | } |
838 | d_fnend(2, dev, "(i2400m %p roq %p skb %p lbn %u) = void\n", | 835 | d_fnend(2, dev, "(i2400m %p roq %p skb %p lbn %u) = void\n", |
839 | i2400m, roq, skb, lbn); | 836 | i2400m, roq, skb, lbn); |
840 | return; | ||
841 | } | 837 | } |
842 | 838 | ||
843 | 839 | ||
@@ -863,7 +859,6 @@ void i2400m_roq_update_ws(struct i2400m *i2400m, struct i2400m_roq *roq, | |||
863 | i2400m_roq_log_add(i2400m, roq, I2400M_RO_TYPE_WS, | 859 | i2400m_roq_log_add(i2400m, roq, I2400M_RO_TYPE_WS, |
864 | old_ws, len, sn, nsn, roq->ws); | 860 | old_ws, len, sn, nsn, roq->ws); |
865 | d_fnstart(2, dev, "(i2400m %p roq %p sn %u) = void\n", i2400m, roq, sn); | 861 | d_fnstart(2, dev, "(i2400m %p roq %p sn %u) = void\n", i2400m, roq, sn); |
866 | return; | ||
867 | } | 862 | } |
868 | 863 | ||
869 | 864 | ||
@@ -912,7 +907,6 @@ void i2400m_roq_queue_update_ws(struct i2400m *i2400m, struct i2400m_roq *roq, | |||
912 | } | 907 | } |
913 | d_fnend(2, dev, "(i2400m %p roq %p skb %p sn %u) = void\n", | 908 | d_fnend(2, dev, "(i2400m %p roq %p skb %p sn %u) = void\n", |
914 | i2400m, roq, skb, sn); | 909 | i2400m, roq, skb, sn); |
915 | return; | ||
916 | } | 910 | } |
917 | 911 | ||
918 | 912 | ||
@@ -1041,7 +1035,6 @@ error_skb_clone: | |||
1041 | error: | 1035 | error: |
1042 | d_fnend(2, dev, "(i2400m %p skb_rx %p single %u payload %p " | 1036 | d_fnend(2, dev, "(i2400m %p skb_rx %p single %u payload %p " |
1043 | "size %zu) = void\n", i2400m, skb_rx, single_last, payload, size); | 1037 | "size %zu) = void\n", i2400m, skb_rx, single_last, payload, size); |
1044 | return; | ||
1045 | } | 1038 | } |
1046 | 1039 | ||
1047 | 1040 | ||
diff --git a/drivers/net/wimax/i2400m/sdio-rx.c b/drivers/net/wimax/i2400m/sdio-rx.c index d619da33f20b..8b809c2ead6c 100644 --- a/drivers/net/wimax/i2400m/sdio-rx.c +++ b/drivers/net/wimax/i2400m/sdio-rx.c | |||
@@ -197,7 +197,6 @@ error_alloc_skb: | |||
197 | error_get_size: | 197 | error_get_size: |
198 | error_bad_size: | 198 | error_bad_size: |
199 | d_fnend(7, dev, "(i2400ms %p) = %d\n", i2400ms, ret); | 199 | d_fnend(7, dev, "(i2400ms %p) = %d\n", i2400ms, ret); |
200 | return; | ||
201 | } | 200 | } |
202 | 201 | ||
203 | 202 | ||
@@ -229,7 +228,6 @@ void i2400ms_irq(struct sdio_func *func) | |||
229 | i2400ms_rx(i2400ms); | 228 | i2400ms_rx(i2400ms); |
230 | error_no_irq: | 229 | error_no_irq: |
231 | d_fnend(6, dev, "(i2400ms %p) = void\n", i2400ms); | 230 | d_fnend(6, dev, "(i2400ms %p) = void\n", i2400ms); |
232 | return; | ||
233 | } | 231 | } |
234 | 232 | ||
235 | 233 | ||
diff --git a/drivers/net/wimax/i2400m/usb-notif.c b/drivers/net/wimax/i2400m/usb-notif.c index 7b6a1d98bd74..d44b545f4082 100644 --- a/drivers/net/wimax/i2400m/usb-notif.c +++ b/drivers/net/wimax/i2400m/usb-notif.c | |||
@@ -178,7 +178,6 @@ error_submit: | |||
178 | out: | 178 | out: |
179 | d_fnend(4, dev, "(urb %p status %d actual_length %d) = void\n", | 179 | d_fnend(4, dev, "(urb %p status %d actual_length %d) = void\n", |
180 | urb, urb->status, urb->actual_length); | 180 | urb, urb->status, urb->actual_length); |
181 | return; | ||
182 | } | 181 | } |
183 | 182 | ||
184 | 183 | ||