lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.11.1412281912360.1328@eggly.anvils>
Date:	Sun, 28 Dec 2014 19:38:07 -0800 (PST)
From:	Hugh Dickins <hughd@...gle.com>
To:	Joe Perches <joe@...ches.com>
cc:	Al Viro <viro@...iv.linux.org.uk>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Alexander Kuleshov <kuleshovmail@...il.com>,
	Miklos Szeredi <miklos@...redi.hu>,
	linux-kernel@...r.kernel.org
Subject: Re: [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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ