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>
This commit is contained in:
Joe Perches
2010-05-17 23:08:21 -07:00
committed by David S. Miller
parent b60b6592ba
commit 3fa21e07e6
48 changed files with 0 additions and 131 deletions
-1
View File
@@ -308,7 +308,6 @@ handle_recv(struct p9_client *client, struct p9_trans_rdma *rdma,
req, err, status); req, err, status);
rdma->state = P9_RDMA_FLUSHING; rdma->state = P9_RDMA_FLUSHING;
client->status = Disconnected; client->status = Disconnected;
return;
} }
static void static void
-1
View File
@@ -446,7 +446,6 @@ error:
net_dev->stats.rx_errors++; net_dev->stats.rx_errors++;
free_skb: free_skb:
dev_kfree_skb(skb); dev_kfree_skb(skb);
return;
} }
/* /*
-6
View File
@@ -161,8 +161,6 @@ static void lec_handle_bridge(struct sk_buff *skb, struct net_device *dev)
skb_queue_tail(&sk->sk_receive_queue, skb2); skb_queue_tail(&sk->sk_receive_queue, skb2);
sk->sk_data_ready(sk, skb2->len); sk->sk_data_ready(sk, skb2->len);
} }
return;
} }
#endif /* defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) */ #endif /* defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) */
@@ -640,7 +638,6 @@ static void lec_set_multicast_list(struct net_device *dev)
* by default, all multicast frames arrive over the bus. * by default, all multicast frames arrive over the bus.
* eventually support selective multicast service * eventually support selective multicast service
*/ */
return;
} }
static const struct net_device_ops lec_netdev_ops = { static const struct net_device_ops lec_netdev_ops = {
@@ -1199,8 +1196,6 @@ static void __exit lane_module_cleanup(void)
dev_lec[i] = NULL; dev_lec[i] = NULL;
} }
} }
return;
} }
module_init(lane_module_init); module_init(lane_module_init);
@@ -1334,7 +1329,6 @@ static void lane2_associate_ind(struct net_device *dev, const u8 *mac_addr,
priv->lane2_ops->associate_indicator(dev, mac_addr, priv->lane2_ops->associate_indicator(dev, mac_addr,
tlvs, sizeoftlvs); tlvs, sizeoftlvs);
} }
return;
} }
/* /*
-32
View File
@@ -455,7 +455,6 @@ static void lane2_assoc_ind(struct net_device *dev, const u8 *mac_addr,
if (end_of_tlvs - tlvs != 0) if (end_of_tlvs - tlvs != 0)
pr_info("(%s) ignoring %Zd bytes of trailing TLV garbage\n", pr_info("(%s) ignoring %Zd bytes of trailing TLV garbage\n",
dev->name, end_of_tlvs - tlvs); dev->name, end_of_tlvs - tlvs);
return;
} }
/* /*
@@ -684,8 +683,6 @@ static void mpc_vcc_close(struct atm_vcc *vcc, struct net_device *dev)
if (in_entry == NULL && eg_entry == NULL) if (in_entry == NULL && eg_entry == NULL)
dprintk("(%s) unused vcc closed\n", dev->name); dprintk("(%s) unused vcc closed\n", dev->name);
return;
} }
static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb) static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb)
@@ -783,8 +780,6 @@ static void mpc_push(struct atm_vcc *vcc, struct sk_buff *skb)
memset(ATM_SKB(skb), 0, sizeof(struct atm_skb_data)); memset(ATM_SKB(skb), 0, sizeof(struct atm_skb_data));
netif_rx(new_skb); netif_rx(new_skb);
return;
} }
static struct atmdev_ops mpc_ops = { /* only send is required */ static struct atmdev_ops mpc_ops = { /* only send is required */
@@ -873,8 +868,6 @@ static void send_set_mps_ctrl_addr(const char *addr, struct mpoa_client *mpc)
mesg.type = SET_MPS_CTRL_ADDR; mesg.type = SET_MPS_CTRL_ADDR;
memcpy(mesg.MPS_ctrl, addr, ATM_ESA_LEN); memcpy(mesg.MPS_ctrl, addr, ATM_ESA_LEN);
msg_to_mpoad(&mesg, mpc); msg_to_mpoad(&mesg, mpc);
return;
} }
static void mpoad_close(struct atm_vcc *vcc) static void mpoad_close(struct atm_vcc *vcc)
@@ -911,8 +904,6 @@ static void mpoad_close(struct atm_vcc *vcc)
pr_info("(%s) going down\n", pr_info("(%s) going down\n",
(mpc->dev) ? mpc->dev->name : "<unknown>"); (mpc->dev) ? mpc->dev->name : "<unknown>");
module_put(THIS_MODULE); module_put(THIS_MODULE);
return;
} }
/* /*
@@ -1122,7 +1113,6 @@ static void MPOA_trigger_rcvd(struct k_message *msg, struct mpoa_client *mpc)
pr_info("(%s) entry already in resolving state\n", pr_info("(%s) entry already in resolving state\n",
(mpc->dev) ? mpc->dev->name : "<unknown>"); (mpc->dev) ? mpc->dev->name : "<unknown>");
mpc->in_ops->put(entry); mpc->in_ops->put(entry);
return;
} }
/* /*
@@ -1166,7 +1156,6 @@ static void check_qos_and_open_shortcut(struct k_message *msg,
} else } else
memset(&msg->qos, 0, sizeof(struct atm_qos)); memset(&msg->qos, 0, sizeof(struct atm_qos));
msg_to_mpoad(msg, client); msg_to_mpoad(msg, client);
return;
} }
static void MPOA_res_reply_rcvd(struct k_message *msg, struct mpoa_client *mpc) static void MPOA_res_reply_rcvd(struct k_message *msg, struct mpoa_client *mpc)
@@ -1240,8 +1229,6 @@ static void ingress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc)
mpc->in_ops->put(entry); mpc->in_ops->put(entry);
entry = mpc->in_ops->get_with_mask(dst_ip, mpc, mask); entry = mpc->in_ops->get_with_mask(dst_ip, mpc, mask);
} while (entry != NULL); } while (entry != NULL);
return;
} }
static void egress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc) static void egress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc)
@@ -1260,8 +1247,6 @@ static void egress_purge_rcvd(struct k_message *msg, struct mpoa_client *mpc)
write_unlock_irq(&mpc->egress_lock); write_unlock_irq(&mpc->egress_lock);
mpc->eg_ops->put(entry); mpc->eg_ops->put(entry);
return;
} }
static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry) static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry)
@@ -1295,8 +1280,6 @@ static void purge_egress_shortcut(struct atm_vcc *vcc, eg_cache_entry *entry)
skb_queue_tail(&sk->sk_receive_queue, skb); skb_queue_tail(&sk->sk_receive_queue, skb);
sk->sk_data_ready(sk, skb->len); sk->sk_data_ready(sk, skb->len);
dprintk("exiting\n"); dprintk("exiting\n");
return;
} }
/* /*
@@ -1325,8 +1308,6 @@ static void mps_death(struct k_message *msg, struct mpoa_client *mpc)
mpc->in_ops->destroy_cache(mpc); mpc->in_ops->destroy_cache(mpc);
mpc->eg_ops->destroy_cache(mpc); mpc->eg_ops->destroy_cache(mpc);
return;
} }
static void MPOA_cache_impos_rcvd(struct k_message *msg, static void MPOA_cache_impos_rcvd(struct k_message *msg,
@@ -1353,8 +1334,6 @@ static void MPOA_cache_impos_rcvd(struct k_message *msg,
write_unlock_irq(&mpc->egress_lock); write_unlock_irq(&mpc->egress_lock);
mpc->eg_ops->put(entry); mpc->eg_ops->put(entry);
return;
} }
static void set_mpc_ctrl_addr_rcvd(struct k_message *mesg, static void set_mpc_ctrl_addr_rcvd(struct k_message *mesg,
@@ -1392,8 +1371,6 @@ static void set_mpc_ctrl_addr_rcvd(struct k_message *mesg,
pr_info("(%s) targetless LE_ARP request failed\n", pr_info("(%s) targetless LE_ARP request failed\n",
mpc->dev->name); mpc->dev->name);
} }
return;
} }
static void set_mps_mac_addr_rcvd(struct k_message *msg, static void set_mps_mac_addr_rcvd(struct k_message *msg,
@@ -1409,8 +1386,6 @@ static void set_mps_mac_addr_rcvd(struct k_message *msg,
return; return;
} }
client->number_of_mps_macs = 1; client->number_of_mps_macs = 1;
return;
} }
/* /*
@@ -1436,7 +1411,6 @@ static void clean_up(struct k_message *msg, struct mpoa_client *mpc, int action)
msg->type = action; msg->type = action;
msg_to_mpoad(msg, mpc); msg_to_mpoad(msg, mpc);
return;
} }
static void mpc_timer_refresh(void) static void mpc_timer_refresh(void)
@@ -1445,8 +1419,6 @@ static void mpc_timer_refresh(void)
mpc_timer.data = mpc_timer.expires; mpc_timer.data = mpc_timer.expires;
mpc_timer.function = mpc_cache_check; mpc_timer.function = mpc_cache_check;
add_timer(&mpc_timer); add_timer(&mpc_timer);
return;
} }
static void mpc_cache_check(unsigned long checking_time) static void mpc_cache_check(unsigned long checking_time)
@@ -1471,8 +1443,6 @@ static void mpc_cache_check(unsigned long checking_time)
mpc = mpc->next; mpc = mpc->next;
} }
mpc_timer_refresh(); mpc_timer_refresh();
return;
} }
static int atm_mpoa_ioctl(struct socket *sock, unsigned int cmd, static int atm_mpoa_ioctl(struct socket *sock, unsigned int cmd,
@@ -1561,8 +1531,6 @@ static void __exit atm_mpoa_cleanup(void)
kfree(qos); kfree(qos);
qos = nextqos; qos = nextqos;
} }
return;
} }
module_init(atm_mpoa_init); module_init(atm_mpoa_init);
-20
View File
@@ -182,8 +182,6 @@ static void in_cache_put(in_cache_entry *entry)
memset(entry, 0, sizeof(in_cache_entry)); memset(entry, 0, sizeof(in_cache_entry));
kfree(entry); kfree(entry);
} }
return;
} }
/* /*
@@ -221,8 +219,6 @@ static void in_cache_remove_entry(in_cache_entry *entry,
} }
vcc_release_async(vcc, -EPIPE); vcc_release_async(vcc, -EPIPE);
} }
return;
} }
/* Call this every MPC-p2 seconds... Not exactly correct solution, /* Call this every MPC-p2 seconds... Not exactly correct solution,
@@ -248,8 +244,6 @@ static void clear_count_and_expired(struct mpoa_client *client)
entry = next_entry; entry = next_entry;
} }
write_unlock_bh(&client->ingress_lock); write_unlock_bh(&client->ingress_lock);
return;
} }
/* Call this every MPC-p4 seconds. */ /* Call this every MPC-p4 seconds. */
@@ -334,8 +328,6 @@ static void in_destroy_cache(struct mpoa_client *mpc)
while (mpc->in_cache != NULL) while (mpc->in_cache != NULL)
mpc->in_ops->remove_entry(mpc->in_cache, mpc); mpc->in_ops->remove_entry(mpc->in_cache, mpc);
write_unlock_irq(&mpc->ingress_lock); write_unlock_irq(&mpc->ingress_lock);
return;
} }
static eg_cache_entry *eg_cache_get_by_cache_id(__be32 cache_id, static eg_cache_entry *eg_cache_get_by_cache_id(__be32 cache_id,
@@ -427,8 +419,6 @@ static void eg_cache_put(eg_cache_entry *entry)
memset(entry, 0, sizeof(eg_cache_entry)); memset(entry, 0, sizeof(eg_cache_entry));
kfree(entry); kfree(entry);
} }
return;
} }
/* /*
@@ -463,8 +453,6 @@ static void eg_cache_remove_entry(eg_cache_entry *entry,
} }
vcc_release_async(vcc, -EPIPE); vcc_release_async(vcc, -EPIPE);
} }
return;
} }
static eg_cache_entry *eg_cache_add_entry(struct k_message *msg, static eg_cache_entry *eg_cache_add_entry(struct k_message *msg,
@@ -509,8 +497,6 @@ static void update_eg_cache_entry(eg_cache_entry *entry, uint16_t holding_time)
do_gettimeofday(&(entry->tv)); do_gettimeofday(&(entry->tv));
entry->entry_state = EGRESS_RESOLVED; entry->entry_state = EGRESS_RESOLVED;
entry->ctrl_info.holding_time = holding_time; entry->ctrl_info.holding_time = holding_time;
return;
} }
static void clear_expired(struct mpoa_client *client) static void clear_expired(struct mpoa_client *client)
@@ -537,8 +523,6 @@ static void clear_expired(struct mpoa_client *client)
entry = next_entry; entry = next_entry;
} }
write_unlock_irq(&client->egress_lock); write_unlock_irq(&client->egress_lock);
return;
} }
static void eg_destroy_cache(struct mpoa_client *mpc) static void eg_destroy_cache(struct mpoa_client *mpc)
@@ -547,8 +531,6 @@ static void eg_destroy_cache(struct mpoa_client *mpc)
while (mpc->eg_cache != NULL) while (mpc->eg_cache != NULL)
mpc->eg_ops->remove_entry(mpc->eg_cache, mpc); mpc->eg_ops->remove_entry(mpc->eg_cache, mpc);
write_unlock_irq(&mpc->egress_lock); write_unlock_irq(&mpc->egress_lock);
return;
} }
@@ -584,6 +566,4 @@ void atm_mpoa_init_cache(struct mpoa_client *mpc)
{ {
mpc->in_ops = &ingress_ops; mpc->in_ops = &ingress_ops;
mpc->eg_ops = &egress_ops; mpc->eg_ops = &egress_ops;
return;
} }
-2
View File
@@ -1316,8 +1316,6 @@ void hci_send_acl(struct hci_conn *conn, struct sk_buff *skb, __u16 flags)
} }
tasklet_schedule(&hdev->tx_task); tasklet_schedule(&hdev->tx_task);
return;
} }
EXPORT_SYMBOL(hci_send_acl); EXPORT_SYMBOL(hci_send_acl);
-3
View File
@@ -1322,8 +1322,6 @@ static void l2cap_drop_acked_frames(struct sock *sk)
if (!l2cap_pi(sk)->unacked_frames) if (!l2cap_pi(sk)->unacked_frames)
del_timer(&l2cap_pi(sk)->retrans_timer); del_timer(&l2cap_pi(sk)->retrans_timer);
return;
} }
static inline void l2cap_do_send(struct sock *sk, struct sk_buff *skb) static inline void l2cap_do_send(struct sock *sk, struct sk_buff *skb)
@@ -4667,7 +4665,6 @@ void l2cap_load(void)
/* Dummy function to trigger automatic L2CAP module loading by /* Dummy function to trigger automatic L2CAP module loading by
* other modules that use L2CAP sockets but don't use any other * other modules that use L2CAP sockets but don't use any other
* symbols from it. */ * symbols from it. */
return;
} }
EXPORT_SYMBOL(l2cap_load); EXPORT_SYMBOL(l2cap_load);
-2
View File
@@ -1014,8 +1014,6 @@ static void rfcomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
rfcomm_send_rpn(dev->dlc->session, 1, dev->dlc->dlci, baud, rfcomm_send_rpn(dev->dlc->session, 1, dev->dlc->dlci, baud,
data_bits, stop_bits, parity, data_bits, stop_bits, parity,
RFCOMM_RPN_FLOW_NONE, x_on, x_off, changes); RFCOMM_RPN_FLOW_NONE, x_on, x_off, changes);
return;
} }
static void rfcomm_tty_throttle(struct tty_struct *tty) static void rfcomm_tty_throttle(struct tty_struct *tty)
-1
View File
@@ -273,7 +273,6 @@ static inline void sco_recv_frame(struct sco_conn *conn, struct sk_buff *skb)
drop: drop:
kfree_skb(skb); kfree_skb(skb);
return;
} }
/* -------- Socket interface ---------- */ /* -------- Socket interface ---------- */
-1
View File
@@ -112,7 +112,6 @@ static void caif_device_destroy(struct net_device *dev)
spin_unlock_bh(&caifdevs->lock); spin_unlock_bh(&caifdevs->lock);
kfree(caifd); kfree(caifd);
return;
} }
static int transmit(struct cflayer *layer, struct cfpkt *pkt) static int transmit(struct cflayer *layer, struct cfpkt *pkt)
-2
View File
@@ -713,8 +713,6 @@ static void bcm_remove_op(struct bcm_op *op)
kfree(op->last_frames); kfree(op->last_frames);
kfree(op); kfree(op);
return;
} }
static void bcm_rx_unreg(struct net_device *dev, struct bcm_op *op) static void bcm_rx_unreg(struct net_device *dev, struct bcm_op *op)
-3
View File
@@ -1220,17 +1220,14 @@ void dn_dev_down(struct net_device *dev)
void dn_dev_init_pkt(struct sk_buff *skb) void dn_dev_init_pkt(struct sk_buff *skb)
{ {
return;
} }
void dn_dev_veri_pkt(struct sk_buff *skb) void dn_dev_veri_pkt(struct sk_buff *skb)
{ {
return;
} }
void dn_dev_hello(struct sk_buff *skb) void dn_dev_hello(struct sk_buff *skb)
{ {
return;
} }
void dn_dev_devices_off(void) void dn_dev_devices_off(void)
-1
View File
@@ -264,7 +264,6 @@ static struct dst_entry *dn_dst_negative_advice(struct dst_entry *dst)
static void dn_dst_link_failure(struct sk_buff *skb) static void dn_dst_link_failure(struct sk_buff *skb)
{ {
return;
} }
static inline int compare_keys(struct flowi *fl1, struct flowi *fl2) static inline int compare_keys(struct flowi *fl1, struct flowi *fl2)
-2
View File
@@ -290,8 +290,6 @@ void cipso_v4_cache_invalidate(void)
cipso_v4_cache[iter].size = 0; cipso_v4_cache[iter].size = 0;
spin_unlock_bh(&cipso_v4_cache[iter].lock); spin_unlock_bh(&cipso_v4_cache[iter].lock);
} }
return;
} }
/** /**
-2
View File
@@ -1022,8 +1022,6 @@ static void trie_rebalance(struct trie *t, struct tnode *tn)
rcu_assign_pointer(t->trie, (struct node *)tn); rcu_assign_pointer(t->trie, (struct node *)tn);
tnode_free_flush(); tnode_free_flush();
return;
} }
/* only used from updater-side */ /* only used from updater-side */
-1
View File
@@ -502,7 +502,6 @@ static void ipgre_err(struct sk_buff *skb, u32 info)
t->err_time = jiffies; t->err_time = jiffies;
out: out:
rcu_read_unlock(); rcu_read_unlock();
return;
} }
static inline void ipgre_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb) static inline void ipgre_ecn_decapsulate(struct iphdr *iph, struct sk_buff *skb)
-1
View File
@@ -238,7 +238,6 @@ void ip_options_fragment(struct sk_buff * skb)
opt->rr_needaddr = 0; opt->rr_needaddr = 0;
opt->ts_needaddr = 0; opt->ts_needaddr = 0;
opt->ts_needtime = 0; opt->ts_needtime = 0;
return;
} }
/* /*
-1
View File
@@ -1606,7 +1606,6 @@ static void ipmr_queue_xmit(struct net *net, struct mr_table *mrt,
out_free: out_free:
kfree_skb(skb); kfree_skb(skb);
return;
} }
static int ipmr_find_vif(struct mr_table *mrt, struct net_device *dev) static int ipmr_find_vif(struct mr_table *mrt, struct net_device *dev)
-2
View File
@@ -890,8 +890,6 @@ out:
in6_ifa_put(ifp); in6_ifa_put(ifp);
else else
in6_dev_put(idev); in6_dev_put(idev);
return;
} }
static void ndisc_recv_na(struct sk_buff *skb) static void ndisc_recv_na(struct sk_buff *skb)
-1
View File
@@ -168,7 +168,6 @@ static void snmp6_seq_show_icmpv6msg(struct seq_file *seq, void __percpu **mib)
i & 0x100 ? "Out" : "In", i & 0xff); i & 0x100 ? "Out" : "In", i & 0xff);
seq_printf(seq, "%-32s\t%lu\n", name, val); seq_printf(seq, "%-32s\t%lu\n", name, val);
} }
return;
} }
static void snmp6_seq_show_item(struct seq_file *seq, void __percpu **mib, static void snmp6_seq_show_item(struct seq_file *seq, void __percpu **mib,

Some files were not shown because too many files have changed in this diff Show More