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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 23 Sep 2018 18:25:43 +0100
From:   benmoore422@...il.com
To:     w@....eu, miguel.ojeda.sandonis@...il.com, geert+renesas@...der.be
Cc:     linux-kernel@...r.kernel.org, benmoore422@...il.com
Subject: [PATCH] [PATCHv2 TRIVIAL] auxdisplay: remove unnecessary braces

From: Ben Moore <benmoore422@...il.com>

I have removed some unnecessary braces from if statements.
As well as inspecting the other driverfiles for similar
style issues.

Signed-off-by: Ben Moore <benmoore422@...il.com>
---
 drivers/auxdisplay/ht16k33.c | 4 ++--
 drivers/auxdisplay/panel.c   | 5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c
index a43276c76fc6..854bb2b90368 100644
--- a/drivers/auxdisplay/ht16k33.c
+++ b/drivers/auxdisplay/ht16k33.c
@@ -479,9 +479,9 @@ static int ht16k33_probe(struct i2c_client *client,

 	err = of_property_read_u32(node, "default-brightness-level",
 				   &dft_brightness);
-	if (err) {
+	if (err)
 		dft_brightness = MAX_BRIGHTNESS;
-	} else if (dft_brightness > MAX_BRIGHTNESS) {
+	else if (dft_brightness > MAX_BRIGHTNESS) {
 		dev_warn(&client->dev,
 			 "invalid default brightness level: %u, using %u\n",
 			 dft_brightness, MAX_BRIGHTNESS);
diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
index 3b25a643058c..f769431fbb52 100644
--- a/drivers/auxdisplay/panel.c
+++ b/drivers/auxdisplay/panel.c
@@ -695,11 +695,10 @@ static void lcd_send_serial(int byte)
 	for (bit = 0; bit < 8; bit++) {
 		clear_bit(LCD_BIT_CL, bits);	/* CLK low */
 		panel_set_bits();
-		if (byte & 1) {
+		if (byte & 1)
 			set_bit(LCD_BIT_DA, bits);
-		} else {
+		else
 			clear_bit(LCD_BIT_DA, bits);
-		}

 		panel_set_bits();
 		udelay(2);  /* maintain the data during 2 us before CLK up */
--
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ