From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755539AbeAHS1G (ORCPT + 1 other); Mon, 8 Jan 2018 13:27:06 -0500 Received: from smtprelay0074.hostedemail.com ([216.40.44.74]:48418 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755000AbeAHS1F (ORCPT ); Mon, 8 Jan 2018 13:27:05 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: game78_35c69e22671e X-Filterd-Recvd-Size: 2413 Message-ID: <1515436021.9619.36.camel@perches.com> Subject: Re: [PATCH 2/3] drivers/fbtft: Remove unnecessary braces from if/else From: Joe Perches To: Dan Carpenter , Luis Gerhorst Cc: Thomas Petazzoni , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Jonny =?ISO-8859-1?Q?Sch=E4fer?= , linux-kernel@i4.cs.fau.de Date: Mon, 08 Jan 2018 10:27:01 -0800 In-Reply-To: <20180108150339.3jstz64fbawef45i@mwanda> References: <1515405997-12563-1-git-send-email-linux-kernel@luisgerhorst.de> <20180108150339.3jstz64fbawef45i@mwanda> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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.