lkml.org 
[lkml]   [2014]   [Dec]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs: overlayfs: Fix coding style issues, missing a blank line after declarations
On Sun, 28 Dec 2014, Joe Perches wrote:
> On Mon, 2014-12-29 at 02:49 +0000, Al Viro wrote:
> > On Mon, Dec 29, 2014 at 02:39:39AM +0000, Al Viro wrote:
> > > On Sun, Dec 28, 2014 at 11:56:53AM +0600, Alexander Kuleshov wrote:
> > > > Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
> > > > ---
> > >
> > > For the record: anything of that sort against fs/*.c will be flushed down
> > > the toilet where such valuable contributions belong. Don't even bother.
> >
> > Joe, could you please explain what has driven you to include that into
> > scripts/checkpatch.pl and open the countless sphincters? Aren't we
> > getting enough pointless patches as it is?
>
> I don't care for that style actually.
> It was Andrew Morton that wanted it used globally.
>
> I wanted it to be a --strict test and only for
> net/ and drivers/net/ where David Miller prefers
> that style.
>
> https://lkml.org/lkml/2014/3/6/550

Although I am guilty of inflicting it on others, just so their patches
keep checkpatch.pl quiet, I have been finding this rule very counter-
productive, and often at odds with long-established good practice.

It makes sense at the head of a substantial function declaring a
collection of variables; but Alexander's patch gives many fine examples
of where it is stupid, and thank you to him for showing it up so well.

In a wrapper function which finds it convenient to declare and assign
a variable before doing a line or two and returning, a common pattern,
a blank line is just distracting hot air to pacify checkpatch.pl.

In a block which needs one extra local variable to do its work, I find
the rule pushes me to move that declaration to the head of the function
instead of keeping it local to the block, just to avoid the unnecessary
blank line.

Please rescind or refine the rule - thanks.

Hugh


\
 
 \ /
  Last update: 2014-12-29 05:21    [W:0.035 / U:0.752 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site