[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1276580526.30434.330.camel@edumazet-laptop>
Date: Tue, 15 Jun 2010 07:42:06 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: Joe Perches <joe@...ches.com>
Cc: netdev <netdev@...r.kernel.org>, David Miller <davem@...emloft.net>
Subject: Re: [RFC patch net/next] net: Hoist assigns from if?
Le lundi 14 juin 2010 à 17:20 -0700, Joe Perches a écrit :
> Awhile back I posted a script to reformat source code,
> similar to Lindent, but able to select in a piecemeal
> manner what source code style to convert.
>
> http://lkml.org/lkml/2010/3/24/447
>
> One of the options is to convert code from:
> if ((err = function(args)) != NULL) {
> to:
> err = function(args);
> if (err != NULL) {
>
> I ran this script against net/ and get this result:
>
> $ grep -rPl --include=*.[ch] "\bif\s*\(\s*\(" net/ | \
> grep -v netfilter | \
> xargs ./scripts/cvt_kernel_style.pl -o -convert=hoist_assigns_from_if
>
> and after a little cleanup, compilation verification, etc
> I get the diffstat below. Should I post the actual patch?
>
I'll answer for myself, but wait for David answer ;)
Quite honestly, this kind of patch sucks, because it pollutes 'git
blame' output. Its hard to point out the origin of a particular
bug/code, and we have to spend precious time playing with complex git
commands to go over cleanup patches.
Maybe its possible to mark a patch with a 'cleanups only' git qualifier
that can be ignored by 'git blame' ?
If not, that would be a nice git improvement to work on.
Alternatively, you could change real old stuff only (marked as the
original commit from Linus (1da177e4c3f4), creation of the known
universe back in 2005.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists