lkml.org 
[lkml]   [2015]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] net: ll_temac: Use one return statement instead of two
On Mon, 11 May 2015, Michal Simek wrote:

> On 05/11/2015 04:42 PM, Joe Perches wrote:
> > On Mon, 2015-05-11 at 16:05 +0200, Michal Simek wrote:
> >> Use one return statement instead of two to simplify the code.
> >> Both are returning the same value.
> >
> > trivia and FYI:
>
> But still correct right?
>
> >
> > I think there are about 100 of these in kernel tree
> > and I'm not going to submit patches.
> >
> > $ grep-2.5.4 -rP --include=*.[ch] -n "^([\t]+)\treturn[ \t]+([A-Za-z0-9\_\>\(\)\.\>\[\]\-]+);\n(\1}\n)?\1return[ \t]+\2;" * | \
> > grep -P "^[\w\/\.]+:\d+:"
>
> Are you suggesting that someone else should send patches for it?
> I expect that this is something what Julia can check with coccinelle
> and can be added to scripts folder.

I can do something based on the original patch. I have no idea what the
regular expression does :)

julia


\
 
 \ /
  Last update: 2015-05-11 18:21    [W:0.049 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site