Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: Remove unnecessary returns from void function()s

This patch removes from net/ (but not any netfilter files)
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.

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; }'

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Joe Perches and committed by
David S. Miller
3fa21e07 b60b6592

-131
-1
net/9p/trans_rdma.c
··· 308 308 req, err, status); 309 309 rdma->state = P9_RDMA_FLUSHING; 310 310 client->status = Disconnected; 311 - return; 312 311 } 313 312 314 313 static void
-1
net/atm/br2684.c
··· 446 446 net_dev->stats.rx_errors++; 447 447 free_skb: 448 448 dev_kfree_skb(skb); 449 - return; 450 449 } 451 450 452 451 /*
-6
net/atm/lec.c
··· 161 161 skb_queue_tail(&sk->sk_receive_queue, skb2); 162 162 sk->sk_data_ready(sk, skb2->len); 163 163 } 164 - 165 - return; 166 164 } 167 165 #endif /* defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) */ 168 166 ··· 638 640 * by default, all multicast frames arrive over the bus. 639 641 * eventually support selective multicast service 640 642 */ 641 - return; 642 643 } 643 644 644 645 static const struct net_device_ops lec_netdev_ops = { ··· 1196 1199 dev_lec[i] = NULL; 1197 1200 } 1198 1201 } 1199 - 1200 - return; 1201 1202 } 1202 1203 1203 1204 module_init(lane_module_init); ··· 1329 1334 priv->lane2_ops->associate_indicator(dev, mac_addr, 1330 1335 tlvs, sizeoftlvs); 1331 1336 } 1332 - return; 1333 1337 } 1334 1338 1335 1339 /*
-32
net/atm/mpc.c
··· 455 455 if (end_of_tlvs - tlvs != 0) 456 456 pr_info("(%s) ignoring %Zd bytes of trailing TLV garbage\n", 457 457 dev->name, end_of_tlvs - tlvs); 458 - return; 459 458 } 460 459 461 460 /* ··· 683 684 684 685 if (in_entry == NULL && eg_entry == NULL) 685 686 dprintk("(%s) unused vcc closed\n", dev->name); 686 - 687 - return; 688 687 } 689 688 690 689 static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb) ··· 780 783 781 784 memset(ATM_SKB(skb), 0, sizeof(struct atm_skb_data)); 782 785 netif_rx(new_skb); 783 - 784 - return; 785 786 } 786 787 787 788 static struct atmdev_ops mpc_ops = { /* only send is required */ ··· 868 873 mesg.type = SET_MPS_CTRL_ADDR; 869 874 memcpy(mesg.MPS_ctrl, addr, ATM_ESA_LEN); 870 875 msg_to_mpoad(&mesg, mpc); 871 - 872 - return; 873 876 } 874 877 875 878 static void mpoad_close(struct atm_vcc *vcc) ··· 904 911 pr_info("(%s) going down\n", 905 912 (mpc->dev) ? mpc->dev->name : "<unknown>"); 906 913 module_put(THIS_MODULE); 907 - 908 - return; 909 914 } 910 915 911 916 /* ··· 1113 1122 pr_info("(%s) entry already in resolving state\n", 1114 1123 (mpc->dev) ? mpc->dev->name : "<unknown>"); 1115 1124 mpc->in_ops->put(entry); 1116 - return; 1117 1125 } 1118 1126 1119 1127 /* ··· 1156 1166 } else 1157 1167 memset(&msg->qos, 0, sizeof(struct atm_qos)); 1158 1168 msg_to_mpoad(msg, client); 1159 - return; 1160 1169 } 1161 1170 1162 1171 static void MPOA_res_reply_rcvd(struct k_message *msg, struct mpoa_client *mpc) ··· 1229 1240 mpc->in_ops->put(entry); 1230 1241 entry = mpc->in_ops->get_with_mask(dst_ip, mpc, mask); 1231 1242 } while (entry != NULL); 1232 - 1233 - return; 1234 1243 } 1235 1244 1236 1245 static void egress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc) ··· 1247 1260 write_unlock_irq(&mpc->egress_lock); 1248 1261 1249 1262 mpc->eg_ops->put(entry); 1250 - 1251 - return; 1252 1263 } 1253 1264 1254 1265 static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry) ··· 1280 1295 skb_queue_tail(&sk->sk_receive_queue, skb); 1281 1296 sk->sk_data_ready(sk, skb->len); 1282 1297 dprintk("exiting\n"); 1283 - 1284 - return; 1285 1298 } 1286 1299 1287 1300 /* ··· 1308 1325 1309 1326 mpc->in_ops->destroy_cache(mpc); 1310 1327 mpc->eg_ops->destroy_cache(mpc); 1311 - 1312 - return; 1313 1328 } 1314 1329 1315 1330 static void MPOA_cache_impos_rcvd(struct k_message *msg, ··· 1334 1353 write_unlock_irq(&mpc->egress_lock); 1335 1354 1336 1355 mpc->eg_ops->put(entry); 1337 - 1338 - return; 1339 1356 } 1340 1357 1341 1358 static void set_mpc_ctrl_addr_rcvd(struct k_message *mesg, ··· 1371 1392 pr_info("(%s) targetless LE_ARP request failed\n", 1372 1393 mpc->dev->name); 1373 1394 } 1374 - 1375 - return; 1376 1395 } 1377 1396 1378 1397 static void set_mps_mac_addr_rcvd(struct k_message *msg, ··· 1386 1409 return; 1387 1410 } 1388 1411 client->number_of_mps_macs = 1; 1389 - 1390 - return; 1391 1412 } 1392 1413 1393 1414 /* ··· 1411 1436 1412 1437 msg->type = action; 1413 1438 msg_to_mpoad(msg, mpc); 1414 - return; 1415 1439 } 1416 1440 1417 1441 static void mpc_timer_refresh(void) ··· 1419 1445 mpc_timer.data = mpc_timer.expires; 1420 1446 mpc_timer.function = mpc_cache_check; 1421 1447 add_timer(&mpc_timer); 1422 - 1423 - return; 1424 1448 } 1425 1449 1426 1450 static void mpc_cache_check(unsigned long checking_time) ··· 1443 1471 mpc = mpc->next; 1444 1472 } 1445 1473 mpc_timer_refresh(); 1446 - 1447 - return; 1448 1474 } 1449 1475 1450 1476 static int atm_mpoa_ioctl(struct socket *sock, unsigned int cmd, ··· 1531 1561 kfree(qos); 1532 1562 qos = nextqos; 1533 1563 } 1534 - 1535 - return; 1536 1564 } 1537 1565 1538 1566 module_init(atm_mpoa_init);
-20
net/atm/mpoa_caches.c
··· 182 182 memset(entry, 0, sizeof(in_cache_entry)); 183 183 kfree(entry); 184 184 } 185 - 186 - return; 187 185 } 188 186 189 187 /* ··· 219 221 } 220 222 vcc_release_async(vcc, -EPIPE); 221 223 } 222 - 223 - return; 224 224 } 225 225 226 226 /* Call this every MPC-p2 seconds... Not exactly correct solution, ··· 244 248 entry = next_entry; 245 249 } 246 250 write_unlock_bh(&client->ingress_lock); 247 - 248 - return; 249 251 } 250 252 251 253 /* Call this every MPC-p4 seconds. */ ··· 328 334 while (mpc->in_cache != NULL) 329 335 mpc->in_ops->remove_entry(mpc->in_cache, mpc); 330 336 write_unlock_irq(&mpc->ingress_lock); 331 - 332 - return; 333 337 } 334 338 335 339 static eg_cache_entry *eg_cache_get_by_cache_id(__be32 cache_id, ··· 419 427 memset(entry, 0, sizeof(eg_cache_entry)); 420 428 kfree(entry); 421 429 } 422 - 423 - return; 424 430 } 425 431 426 432 /* ··· 453 463 } 454 464 vcc_release_async(vcc, -EPIPE); 455 465 } 456 - 457 - return; 458 466 } 459 467 460 468 static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, ··· 497 509 do_gettimeofday(&(entry->tv)); 498 510 entry->entry_state = EGRESS_RESOLVED; 499 511 entry->ctrl_info.holding_time = holding_time; 500 - 501 - return; 502 512 } 503 513 504 514 static void clear_expired(struct mpoa_client *client) ··· 523 537 entry = next_entry; 524 538 } 525 539 write_unlock_irq(&client->egress_lock); 526 - 527 - return; 528 540 } 529 541 530 542 static void eg_destroy_cache(struct mpoa_client *mpc) ··· 531 547 while (mpc->eg_cache != NULL) 532 548 mpc->eg_ops->remove_entry(mpc->eg_cache, mpc); 533 549 write_unlock_irq(&mpc->egress_lock); 534 - 535 - return; 536 550 } 537 551 538 552 ··· 566 584 { 567 585 mpc->in_ops = &ingress_ops; 568 586 mpc->eg_ops = &egress_ops; 569 - 570 - return; 571 587 }
-2
net/bluetooth/hci_core.c
··· 1316 1316 } 1317 1317 1318 1318 tasklet_schedule(&hdev->tx_task); 1319 - 1320 - return; 1321 1319 } 1322 1320 EXPORT_SYMBOL(hci_send_acl); 1323 1321
-3
net/bluetooth/l2cap.c
··· 1322 1322 1323 1323 if (!l2cap_pi(sk)->unacked_frames) 1324 1324 del_timer(&l2cap_pi(sk)->retrans_timer); 1325 - 1326 - return; 1327 1325 } 1328 1326 1329 1327 static inline void l2cap_do_send(struct sock *sk, struct sk_buff *skb) ··· 4665 4667 /* Dummy function to trigger automatic L2CAP module loading by 4666 4668 * other modules that use L2CAP sockets but don't use any other 4667 4669 * symbols from it. */ 4668 - return; 4669 4670 } 4670 4671 EXPORT_SYMBOL(l2cap_load); 4671 4672
-2
net/bluetooth/rfcomm/tty.c
··· 1014 1014 rfcomm_send_rpn(dev->dlc->session, 1, dev->dlc->dlci, baud, 1015 1015 data_bits, stop_bits, parity, 1016 1016 RFCOMM_RPN_FLOW_NONE, x_on, x_off, changes); 1017 - 1018 - return; 1019 1017 } 1020 1018 1021 1019 static void rfcomm_tty_throttle(struct tty_struct *tty)
-1
net/bluetooth/sco.c
··· 273 273 274 274 drop: 275 275 kfree_skb(skb); 276 - return; 277 276 } 278 277 279 278 /* -------- Socket interface ---------- */
-1
net/caif/caif_dev.c
··· 112 112 spin_unlock_bh(&caifdevs->lock); 113 113 114 114 kfree(caifd); 115 - return; 116 115 } 117 116 118 117 static int transmit(struct cflayer *layer, struct cfpkt *pkt)
-2
net/can/bcm.c
··· 713 713 kfree(op->last_frames); 714 714 715 715 kfree(op); 716 - 717 - return; 718 716 } 719 717 720 718 static void bcm_rx_unreg(struct net_device *dev, struct bcm_op *op)
-3
net/decnet/dn_dev.c
··· 1220 1220 1221 1221 void dn_dev_init_pkt(struct sk_buff *skb) 1222 1222 { 1223 - return; 1224 1223 } 1225 1224 1226 1225 void dn_dev_veri_pkt(struct sk_buff *skb) 1227 1226 { 1228 - return; 1229 1227 } 1230 1228 1231 1229 void dn_dev_hello(struct sk_buff *skb) 1232 1230 { 1233 - return; 1234 1231 } 1235 1232 1236 1233 void dn_dev_devices_off(void)
-1
net/decnet/dn_route.c
··· 264 264 265 265 static void dn_dst_link_failure(struct sk_buff *skb) 266 266 { 267 - return; 268 267 } 269 268 270 269 static inline int compare_keys(struct flowi *fl1, struct flowi *fl2)
-2
net/ipv4/cipso_ipv4.c
··· 290 290 cipso_v4_cache[iter].size = 0; 291 291 spin_unlock_bh(&cipso_v4_cache[iter].lock); 292 292 } 293 - 294 - return; 295 293 } 296 294 297 295 /**
-2
net/ipv4/fib_trie.c
··· 1022 1022 1023 1023 rcu_assign_pointer(t->trie, (struct node *)tn); 1024 1024 tnode_free_flush(); 1025 - 1026 - return; 1027 1025 } 1028 1026 1029 1027 /* only used from updater-side */
-1
net/ipv4/ip_gre.c
··· 502 502 t->err_time = jiffies; 503 503 out: 504 504 rcu_read_unlock(); 505 - return; 506 505 } 507 506 508 507 static inline void ipgre_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb)
-1
net/ipv4/ip_options.c
··· 238 238 opt->rr_needaddr = 0; 239 239 opt->ts_needaddr = 0; 240 240 opt->ts_needtime = 0; 241 - return; 242 241 } 243 242 244 243 /*
-1
net/ipv4/ipmr.c
··· 1606 1606 1607 1607 out_free: 1608 1608 kfree_skb(skb); 1609 - return; 1610 1609 } 1611 1610 1612 1611 static int ipmr_find_vif(struct mr_table *mrt, struct net_device *dev)
-2
net/ipv6/ndisc.c
··· 890 890 in6_ifa_put(ifp); 891 891 else 892 892 in6_dev_put(idev); 893 - 894 - return; 895 893 } 896 894 897 895 static void ndisc_recv_na(struct sk_buff *skb)
-1
net/ipv6/proc.c
··· 168 168 i & 0x100 ? "Out" : "In", i & 0xff); 169 169 seq_printf(seq, "%-32s\t%lu\n", name, val); 170 170 } 171 - return; 172 171 } 173 172 174 173 static void snmp6_seq_show_item(struct seq_file *seq, void __percpu **mib,
-2
net/ipv6/route.c
··· 316 316 #else 317 317 static inline void rt6_probe(struct rt6_info *rt) 318 318 { 319 - return; 320 319 } 321 320 #endif 322 321 ··· 1552 1553 1553 1554 out: 1554 1555 dst_release(&rt->u.dst); 1555 - return; 1556 1556 } 1557 1557 1558 1558 /*
-2
net/irda/iriap.c
··· 685 685 /* We have a match; send the value. */ 686 686 iriap_getvaluebyclass_response(self, obj->id, IAS_SUCCESS, 687 687 attrib->value); 688 - 689 - return; 690 688 } 691 689 692 690 /*
-3
net/irda/irnet/irnet_irda.c
··· 678 678 self->stsap_sel = 0; 679 679 680 680 DEXIT(IRDA_SOCK_TRACE, "\n"); 681 - return; 682 681 } 683 682 684 683 ··· 927 928 irttp_listen(self->tsap); 928 929 929 930 DEXIT(IRDA_SERV_TRACE, "\n"); 930 - return; 931 931 } 932 932 933 933 /*------------------------------------------------------------------*/ ··· 1011 1013 irda_irnet_destroy(&irnet_server.s); 1012 1014 1013 1015 DEXIT(IRDA_SERV_TRACE, "\n"); 1014 - return; 1015 1016 } 1016 1017 1017 1018
-1
net/iucv/af_iucv.c
··· 136 136 #ifdef CONFIG_PM_DEBUG 137 137 printk(KERN_WARNING "afiucv_pm_complete\n"); 138 138 #endif 139 - return; 140 139 } 141 140 142 141 /**
-1
net/mac80211/debugfs.h
··· 7 7 #else 8 8 static inline void debugfs_hw_add(struct ieee80211_local *local) 9 9 { 10 - return; 11 10 } 12 11 #endif 13 12
-2
net/mac80211/mesh.c
··· 287 287 *pos++ |= sdata->u.mesh.accepting_plinks ? 288 288 MESHCONF_CAPAB_ACCEPT_PLINKS : 0x00; 289 289 *pos++ = 0x00; 290 - 291 - return; 292 290 } 293 291 294 292 u32 mesh_table_hash(u8 *addr, struct ieee80211_sub_if_data *sdata, struct mesh_table *tbl)
-1
net/mac80211/mesh_hwmp.c
··· 624 624 fail: 625 625 rcu_read_unlock(); 626 626 sdata->u.mesh.mshstats.dropped_frames_no_route++; 627 - return; 628 627 } 629 628 630 629 static void hwmp_perr_frame_process(struct ieee80211_sub_if_data *sdata,
-2
net/netlabel/netlabel_addrlist.h
··· 130 130 int src, const char *dev, 131 131 __be32 addr, __be32 mask) 132 132 { 133 - return; 134 133 } 135 134 #endif 136 135 ··· 202 203 const struct in6_addr *addr, 203 204 const struct in6_addr *mask) 204 205 { 205 - return; 206 206 } 207 207 #endif 208 208 #endif /* IPV6 */
-1
net/netlabel/netlabel_unlabeled.c
··· 670 670 671 671 unlhsh_condremove_failure: 672 672 spin_unlock(&netlbl_unlhsh_lock); 673 - return; 674 673 } 675 674 676 675 /**
-1
net/sched/cls_flow.c
··· 602 602 603 603 static void flow_put(struct tcf_proto *tp, unsigned long f) 604 604 { 605 - return; 606 605 } 607 606 608 607 static int flow_dump(struct tcf_proto *tp, unsigned long fh,
-1
net/sched/sch_hfsc.c
··· 617 617 rtsc->y = y; 618 618 rtsc->dx = dx; 619 619 rtsc->dy = dy; 620 - return; 621 620 } 622 621 623 622 static void
-1
net/sched/sch_ingress.c
··· 44 44 45 45 static void ingress_walk(struct Qdisc *sch, struct qdisc_walker *walker) 46 46 { 47 - return; 48 47 } 49 48 50 49 static struct tcf_proto **ingress_find_tcf(struct Qdisc *sch, unsigned long cl)
-1
net/sched/sch_mq.c
··· 174 174 175 175 static void mq_put(struct Qdisc *sch, unsigned long cl) 176 176 { 177 - return; 178 177 } 179 178 180 179 static int mq_dump_class(struct Qdisc *sch, unsigned long cl,
-1
net/sched/sch_multiq.c
··· 340 340 341 341 static void multiq_put(struct Qdisc *q, unsigned long cl) 342 342 { 343 - return; 344 343 } 345 344 346 345 static int multiq_dump_class(struct Qdisc *sch, unsigned long cl,
-1
net/sched/sch_prio.c
··· 303 303 304 304 static void prio_put(struct Qdisc *q, unsigned long cl) 305 305 { 306 - return; 307 306 } 308 307 309 308 static int prio_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb,
-1
net/sched/sch_red.c
··· 303 303 304 304 static void red_put(struct Qdisc *sch, unsigned long arg) 305 305 { 306 - return; 307 306 } 308 307 309 308 static void red_walk(struct Qdisc *sch, struct qdisc_walker *walker)
-2
net/sctp/associola.c
··· 816 816 if (t != primary) 817 817 sctp_assoc_rm_peer(asoc, t); 818 818 } 819 - 820 - return; 821 819 } 822 820 823 821 /* Engage in transport control operations.
-2
net/sctp/outqueue.c
··· 80 80 { 81 81 list_add(&ch->list, &q->out_chunk_list); 82 82 q->out_qlen += ch->skb->len; 83 - return; 84 83 } 85 84 86 85 /* Take data from the front of the queue. */ ··· 102 103 { 103 104 list_add_tail(&ch->list, &q->out_chunk_list); 104 105 q->out_qlen += ch->skb->len; 105 - return; 106 106 } 107 107 108 108 /*
-3
net/sctp/proc.c
··· 181 181 182 182 static void sctp_eps_seq_stop(struct seq_file *seq, void *v) 183 183 { 184 - return; 185 184 } 186 185 187 186 ··· 285 286 286 287 static void sctp_assocs_seq_stop(struct seq_file *seq, void *v) 287 288 { 288 - return; 289 289 } 290 290 291 291 ··· 407 409 408 410 static void sctp_remaddr_seq_stop(struct seq_file *seq, void *v) 409 411 { 410 - return; 411 412 } 412 413 413 414 static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
-4
net/sctp/sm_sideeffect.c
··· 892 892 sctp_walk_fwdtsn(skip, chunk) { 893 893 sctp_ulpq_skip(ulpq, ntohs(skip->stream), ntohs(skip->ssn)); 894 894 } 895 - 896 - return; 897 895 } 898 896 899 897 /* Helper function to remove the association non-primary peer ··· 910 912 sctp_assoc_del_peer(asoc, &t->ipaddr); 911 913 } 912 914 } 913 - 914 - return; 915 915 } 916 916 917 917 /* Helper function to set sk_err on a 1-1 style socket. */
-2
net/sctp/ulpqueue.c
··· 955 955 * ordering and deliver them if needed. 956 956 */ 957 957 sctp_ulpq_reap_ordered(ulpq, sid); 958 - return; 959 958 } 960 959 961 960 static __u16 sctp_ulpq_renege_list(struct sctp_ulpq *ulpq, ··· 1063 1064 } 1064 1065 1065 1066 sk_mem_reclaim(asoc->base.sk); 1066 - return; 1067 1067 } 1068 1068 1069 1069
-1
net/sunrpc/clnt.c
··· 1518 1518 task->tk_action = call_refresh; 1519 1519 if (status != -ETIMEDOUT) 1520 1520 rpc_delay(task, 3*HZ); 1521 - return; 1522 1521 } 1523 1522 1524 1523 static __be32 *
-1
net/sunrpc/svcsock.c
··· 150 150 } 151 151 break; 152 152 } 153 - return; 154 153 } 155 154 156 155 /*
-1
net/sunrpc/xprt.c
··· 716 716 xprt->stat.connect_start = jiffies; 717 717 xprt->ops->connect(task); 718 718 } 719 - return; 720 719 } 721 720 722 721 static void xprt_connect_status(struct rpc_task *task)
-4
net/sunrpc/xprtsock.c
··· 1050 1050 if (transport->tcp_flags & TCP_RCV_LAST_FRAG) 1051 1051 transport->tcp_flags &= ~TCP_RCV_COPY_DATA; 1052 1052 } 1053 - 1054 - return; 1055 1053 } 1056 1054 1057 1055 /* ··· 2208 2210 2209 2211 static void bc_close(struct rpc_xprt *xprt) 2210 2212 { 2211 - return; 2212 2213 } 2213 2214 2214 2215 /* ··· 2217 2220 2218 2221 static void bc_destroy(struct rpc_xprt *xprt) 2219 2222 { 2220 - return; 2221 2223 } 2222 2224 2223 2225 static struct rpc_xprt_ops xs_udp_ops = {
-1
net/sysctl_net.c
··· 82 82 static void __net_exit sysctl_net_exit(struct net *net) 83 83 { 84 84 WARN_ON(!list_empty(&net->sysctls.list)); 85 - return; 86 85 } 87 86 88 87 static struct pernet_operations sysctl_pernet_ops = {
-2
net/wimax/stack.c
··· 320 320 out: 321 321 d_fnend(3, dev, "(wimax_dev %p new_state %u [old %u]) = void\n", 322 322 wimax_dev, new_state, old_state); 323 - return; 324 323 } 325 324 326 325 ··· 361 362 if (wimax_dev->state > __WIMAX_ST_NULL) 362 363 __wimax_state_change(wimax_dev, new_state); 363 364 mutex_unlock(&wimax_dev->mutex); 364 - return; 365 365 } 366 366 EXPORT_SYMBOL_GPL(wimax_state_change); 367 367
-1
net/xfrm/xfrm_policy.c
··· 2209 2209 static void xfrm_link_failure(struct sk_buff *skb) 2210 2210 { 2211 2211 /* Impossible. Such dst must be popped before reaches point of failure. */ 2212 - return; 2213 2212 } 2214 2213 2215 2214 static struct dst_entry *xfrm_negative_advice(struct dst_entry *dst)