Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/fbtft: Remove unnecessary braces from if/else

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.

Signed-off-by: Luis Gerhorst <linux-kernel@luisgerhorst.de>
Acked-by: Jonny Schaefer <schaefer.jonny@gmail.com>
Acked-by: Alexander Wuerstlein <arw@cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Luis Gerhorst and committed by
Greg Kroah-Hartman
c3738b37 17c9d1ba

+5 -6
+5 -6
drivers/staging/fbtft/fbtft-core.c
··· 1367 1367 } 1368 1368 1369 1369 /* write register functions */ 1370 - if (display->regwidth == 8 && display->buswidth == 8) { 1370 + if (display->regwidth == 8 && display->buswidth == 8) 1371 1371 par->fbtftops.write_register = fbtft_write_reg8_bus8; 1372 - } else if (display->regwidth == 8 && display->buswidth == 9 && par->spi) { 1372 + else if (display->regwidth == 8 && display->buswidth == 9 && par->spi) 1373 1373 par->fbtftops.write_register = fbtft_write_reg8_bus9; 1374 - } else if (display->regwidth == 16 && display->buswidth == 8) { 1374 + else if (display->regwidth == 16 && display->buswidth == 8) 1375 1375 par->fbtftops.write_register = fbtft_write_reg16_bus8; 1376 - } else if (display->regwidth == 16 && display->buswidth == 16) { 1376 + else if (display->regwidth == 16 && display->buswidth == 16) 1377 1377 par->fbtftops.write_register = fbtft_write_reg16_bus16; 1378 - } else { 1378 + else 1379 1379 dev_warn(dev, 1380 1380 "no default functions for regwidth=%d and buswidth=%d\n", 1381 1381 display->regwidth, display->buswidth); 1382 - } 1383 1382 1384 1383 /* write_vmem() functions */ 1385 1384 if (display->buswidth == 8)