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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1515436021.9619.36.camel@perches.com>
Date:   Mon, 08 Jan 2018 10:27:01 -0800
From:   Joe Perches <joe@...ches.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>,
        Luis Gerhorst <linux-kernel@...sgerhorst.de>
Cc:     Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        Jonny Schäfer <schaefer.jonny@...il.com>,
        linux-kernel@...cs.fau.de
Subject: Re: [PATCH 2/3] drivers/fbtft: Remove unnecessary braces from
 if/else

On Mon, 2018-01-08 at 18:03 +0300, Dan Carpenter wrote:
> On Mon, Jan 08, 2018 at 11:06:37AM +0100, Luis Gerhorst wrote:
> > The Linux kernel coding style states that braces should only be used
> > when necessary.
> > 
> > This fixes the checkpatch warning
> > 
> > WARNING: line over 80 characters
> > +	} else if (display->regwidth == 8 && display->buswidth == 9 && par->spi) {
> > 
> > introduced by patch #1.
> > 
> 
> Don't introduce warnings and then fix them in later patches.
> 
> Anyway there is another unwritten rule that multi-line indents get curly
> braces.  Probably it should be:

Nope.  That'd be your own preferred style.

If you want it to be followed by others,
please try and get it added to CodingStyle
and use examples to show why it's better
than allowing maintainer preference.

> 	} else if (display->regwidth == 8 && display->buswidth == 9 &&
> 		   par->spi) {

My own preferred style here would be to align
the display->regwidth and display->buswidth so
I can differentiate the similarity in naming a
bit more easily.

	} else if (display->regwidth == 8 &&
		   display->buswidth == 9 && par->spi) {

I'm not sure at all there is a single best
style for this and it can easily become
situation dependent.

And so I suggest not adding anything about this
style nit to CodingStyle.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ