[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1515405997-12563-1-git-send-email-linux-kernel@luisgerhorst.de>
Date: Mon, 8 Jan 2018 11:06:37 +0100
From: Luis Gerhorst <linux-kernel@...sgerhorst.de>
To: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Cc: Jonny Schäfer <schaefer.jonny@...il.com>,
linux-kernel@...cs.fau.de,
Luis Gerhorst <linux-kernel@...sgerhorst.de>
Subject: [PATCH 2/3] 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@...sgerhorst.de>
Acked-by: Jonny Schaefer <schaefer.jonny@...il.com>
Acked-by: Alexander Wuerstlein <arw@...fau.de>
---
drivers/staging/fbtft/fbtft-core.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 66b46b2..34b1c81 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -1367,19 +1367,18 @@ int fbtft_probe_common(struct fbtft_display *display,
}
/* write register functions */
- if (display->regwidth == 8 && display->buswidth == 8) {
+ if (display->regwidth == 8 && display->buswidth == 8)
par->fbtftops.write_register = fbtft_write_reg8_bus8;
- } else if (display->regwidth == 8 && display->buswidth == 9 && par->spi) {
+ else if (display->regwidth == 8 && display->buswidth == 9 && par->spi)
par->fbtftops.write_register = fbtft_write_reg8_bus9;
- } else if (display->regwidth == 16 && display->buswidth == 8) {
+ else if (display->regwidth == 16 && display->buswidth == 8)
par->fbtftops.write_register = fbtft_write_reg16_bus8;
- } else if (display->regwidth == 16 && display->buswidth == 16) {
+ else if (display->regwidth == 16 && display->buswidth == 16)
par->fbtftops.write_register = fbtft_write_reg16_bus16;
- } else {
+ else
dev_warn(dev,
"no default functions for regwidth=%d and buswidth=%d\n",
display->regwidth, display->buswidth);
- }
/* write_vmem() functions */
if (display->buswidth == 8)
--
2.7.4
Powered by blists - more mailing lists