* drivers/net/ RFC: Remove return; before void function end-of-functions close brace
@ 2010-05-11 1:14 Joe Perches
2010-05-11 5:58 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2010-05-11 1:14 UTC (permalink / raw)
To: netdev
Many functions are declared void but use a return at end-of-function.
void function(void args...)
{
[perform some calcs]
...
return;
}
Removing the unnecessary return; statements would save ~675 lines.
$ grep -rP --include=*.[ch] -l "return;\n}" drivers/net | \
xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }
$ git diff --shortstat drivers/net
186 files changed, 0 insertions(+), 675 deletions(-)
Anyone think such patches acceptable/useful?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: drivers/net/ RFC: Remove return; before void function end-of-functions close brace
2010-05-11 1:14 drivers/net/ RFC: Remove return; before void function end-of-functions close brace Joe Perches
@ 2010-05-11 5:58 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-05-11 5:58 UTC (permalink / raw)
To: joe; +Cc: netdev
From: Joe Perches <joe@perches.com>
Date: Mon, 10 May 2010 18:14:36 -0700
> Anyone think such patches acceptable/useful?
Sure, if you want.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-11 5:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-11 1:14 drivers/net/ RFC: Remove return; before void function end-of-functions close brace Joe Perches
2010-05-11 5:58 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).