linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: benmoore422@gmail.com
To: w@1wt.eu, miguel.ojeda.sandonis@gmail.com, geert+renesas@glider.be
Cc: linux-kernel@vger.kernel.org, benmoore422@gmail.com
Subject: [PATCH] [PATCHv2 TRIVIAL] auxdisplay: remove unnecessary braces
Date: Sun, 23 Sep 2018 18:25:43 +0100	[thread overview]
Message-ID: <20180923172543.5391-1-benmoore422@gmail.com> (raw)

From: Ben Moore <benmoore422@gmail.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@gmail.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


             reply	other threads:[~2018-09-23 17:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-23 17:25 benmoore422 [this message]
2018-10-06 20:59 ` [PATCH] [PATCHv2 TRIVIAL] auxdisplay: remove unnecessary braces Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180923172543.5391-1-benmoore422@gmail.com \
    --to=benmoore422@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=w@1wt.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).