lkml.org 
[lkml]   [2018]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] drivers/fbtft: Remove unnecessary braces from if/else
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:


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

regards,
dan carpenter

\
 
 \ /
  Last update: 2018-01-14 23:17    [W:0.068 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site