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]
Date:   Tue, 25 Jun 2019 10:41:30 +0200
From:   Simon Sandström <simon@...anor.nu>
To:     gregkh@...uxfoundation.org
Cc:     gneukum1@...il.com, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org,
        Simon Sandström <simon@...anor.nu>
Subject: [PATCH 4/4] staging: kpc2000: fix brace issues in kpc2000_spi.c

Fixes checkpatch errors: "else should follow close brace '}'" and
"braces {} are not necessary for single statement blocks".

Signed-off-by: Simon Sandström <simon@...anor.nu>
---
 drivers/staging/kpc2000/kpc2000_spi.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c
index 68b049f9ad69..4b1468137703 100644
--- a/drivers/staging/kpc2000/kpc2000_spi.c
+++ b/drivers/staging/kpc2000/kpc2000_spi.c
@@ -164,9 +164,9 @@ kp_spi_read_reg(struct kp_spi_controller_state *cs, int idx)
 	u64 val;
 
 	addr += idx;
-	if (idx == KP_SPI_REG_CONFIG && cs->conf_cache >= 0) {
+	if (idx == KP_SPI_REG_CONFIG && cs->conf_cache >= 0)
 		return cs->conf_cache;
-	}
+
 	val = readq(addr);
 	return val;
 }
@@ -222,8 +222,7 @@ kp_spi_txrx_pio(struct spi_device *spidev, struct spi_transfer *transfer)
 			kp_spi_write_reg(cs, KP_SPI_REG_TXDATA, val);
 			processed++;
 		}
-	}
-	else if (rx) {
+	} else if (rx) {
 		for (i = 0 ; i < c ; i++) {
 			char test = 0;
 
@@ -261,9 +260,8 @@ kp_spi_setup(struct spi_device *spidev)
 	cs = spidev->controller_state;
 	if (!cs) {
 		cs = kzalloc(sizeof(*cs), GFP_KERNEL);
-		if (!cs) {
+		if (!cs)
 			return -ENOMEM;
-		}
 		cs->base = kpspi->base;
 		cs->conf_cache = -1;
 		spidev->controller_state = cs;
-- 
2.20.1

Powered by blists - more mailing lists