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>
This commit is contained in:
committed by
David S. Miller
parent
21ce849ba5
commit
a4b770972b
@@ -568,7 +568,6 @@ void i2400m_msg_ack_hook(struct i2400m *i2400m,
|
||||
}
|
||||
break;
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1419,5 +1418,4 @@ void i2400m_dev_shutdown(struct i2400m *i2400m)
|
||||
|
||||
d_fnstart(3, dev, "(i2400m %p)\n", i2400m);
|
||||
d_fnend(3, dev, "(i2400m %p) = void\n", i2400m);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -711,7 +711,6 @@ out:
|
||||
kfree(iw);
|
||||
d_fnend(3, dev, "(ws %p i2400m %p reason %s) = void\n",
|
||||
ws, i2400m, reason);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -996,7 +995,6 @@ void __exit i2400m_driver_exit(void)
|
||||
/* for scheds i2400m_dev_reset_handle() */
|
||||
flush_scheduled_work();
|
||||
i2400m_barker_db_exit();
|
||||
return;
|
||||
}
|
||||
module_exit(i2400m_driver_exit);
|
||||
|
||||
|
||||
@@ -255,7 +255,6 @@ void i2400m_net_wake_stop(struct i2400m *i2400m)
|
||||
kfree_skb(wake_tx_skb);
|
||||
}
|
||||
d_fnend(3, dev, "(i2400m %p) = void\n", i2400m);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -434,7 +433,6 @@ void i2400m_tx_timeout(struct net_device *net_dev)
|
||||
* this, there might be data pending to be sent or not...
|
||||
*/
|
||||
net_dev->stats.tx_errors++;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -313,7 +313,6 @@ error_waiter_cancelled:
|
||||
kfree_skb(ack_skb);
|
||||
error_no_waiter:
|
||||
spin_unlock_irqrestore(&i2400m->rx_lock, flags);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -718,7 +717,6 @@ void __i2400m_roq_queue(struct i2400m *i2400m, struct i2400m_roq *roq,
|
||||
out:
|
||||
d_fnend(4, dev, "(i2400m %p roq %p skb %p sn %u nsn %d) = void\n",
|
||||
i2400m, roq, skb, sn, nsn);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -798,7 +796,6 @@ void i2400m_roq_reset(struct i2400m *i2400m, struct i2400m_roq *roq)
|
||||
}
|
||||
roq->ws = 0;
|
||||
d_fnend(2, dev, "(i2400m %p roq %p) = void\n", i2400m, roq);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -837,7 +834,6 @@ void i2400m_roq_queue(struct i2400m *i2400m, struct i2400m_roq *roq,
|
||||
}
|
||||
d_fnend(2, dev, "(i2400m %p roq %p skb %p lbn %u) = void\n",
|
||||
i2400m, roq, skb, lbn);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -863,7 +859,6 @@ void i2400m_roq_update_ws(struct i2400m *i2400m, struct i2400m_roq *roq,
|
||||
i2400m_roq_log_add(i2400m, roq, I2400M_RO_TYPE_WS,
|
||||
old_ws, len, sn, nsn, roq->ws);
|
||||
d_fnstart(2, dev, "(i2400m %p roq %p sn %u) = void\n", i2400m, roq, sn);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -912,7 +907,6 @@ void i2400m_roq_queue_update_ws(struct i2400m *i2400m, struct i2400m_roq *roq,
|
||||
}
|
||||
d_fnend(2, dev, "(i2400m %p roq %p skb %p sn %u) = void\n",
|
||||
i2400m, roq, skb, sn);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -1041,7 +1035,6 @@ error_skb_clone:
|
||||
error:
|
||||
d_fnend(2, dev, "(i2400m %p skb_rx %p single %u payload %p "
|
||||
"size %zu) = void\n", i2400m, skb_rx, single_last, payload, size);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -197,7 +197,6 @@ error_alloc_skb:
|
||||
error_get_size:
|
||||
error_bad_size:
|
||||
d_fnend(7, dev, "(i2400ms %p) = %d\n", i2400ms, ret);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -229,7 +228,6 @@ void i2400ms_irq(struct sdio_func *func)
|
||||
i2400ms_rx(i2400ms);
|
||||
error_no_irq:
|
||||
d_fnend(6, dev, "(i2400ms %p) = void\n", i2400ms);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -178,7 +178,6 @@ error_submit:
|
||||
out:
|
||||
d_fnend(4, dev, "(urb %p status %d actual_length %d) = void\n",
|
||||
urb, urb->status, urb->actual_length);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user