From: Arnd Bergmann <arnd@kernel.org>
To: Lee Jones <lee.jones@linaro.org>,
Daniel Thompson <daniel.thompson@linaro.org>,
Jingoo Han <jingoohan1@gmail.com>,
Kristoffer Ericson <kristoffer.ericson@gmail.com>,
Richard Purdie <rpurdie@linux.intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Sam Ravnborg <sam@ravnborg.org>,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] backlight: journada720: fix Wmisleading-indentation warning
Date: Mon, 22 Mar 2021 17:41:28 +0100 [thread overview]
Message-ID: <20210322164134.827091-1-arnd@kernel.org> (raw)
From: Arnd Bergmann <arnd@arndb.de>
With gcc-11, we get a warning about code that looks correct
but badly indented:
drivers/video/backlight/jornada720_bl.c: In function ‘jornada_bl_update_status’:
drivers/video/backlight/jornada720_bl.c:66:11: error: this ‘else’ clause does not guard... [-Werror=misleading-indentation]
66 | } else /* turn on backlight */
| ^~~~
Change the formatting according to our normal conventions.
Fixes: 13a7b5dc0d17 ("backlight: Adds HP Jornada 700 series backlight driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/video/backlight/jornada720_bl.c | 44 ++++++++++++-------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/video/backlight/jornada720_bl.c b/drivers/video/backlight/jornada720_bl.c
index 996f7ba3b373..066d0dc98f60 100644
--- a/drivers/video/backlight/jornada720_bl.c
+++ b/drivers/video/backlight/jornada720_bl.c
@@ -66,30 +66,30 @@ static int jornada_bl_update_status(struct backlight_device *bd)
} else /* turn on backlight */
PPSR |= PPC_LDD1;
- /* send command to our mcu */
- if (jornada_ssp_byte(SETBRIGHTNESS) != TXDUMMY) {
- dev_info(&bd->dev, "failed to set brightness\n");
- ret = -ETIMEDOUT;
- goto out;
- }
+ /* send command to our mcu */
+ if (jornada_ssp_byte(SETBRIGHTNESS) != TXDUMMY) {
+ dev_info(&bd->dev, "failed to set brightness\n");
+ ret = -ETIMEDOUT;
+ goto out;
+ }
- /*
- * at this point we expect that the mcu has accepted
- * our command and is waiting for our new value
- * please note that maximum brightness is 255,
- * but due to physical layout it is equal to 0, so we simply
- * invert the value (MAX VALUE - NEW VALUE).
- */
- if (jornada_ssp_byte(BL_MAX_BRIGHT - bd->props.brightness)
- != TXDUMMY) {
- dev_err(&bd->dev, "set brightness failed\n");
- ret = -ETIMEDOUT;
- }
+ /*
+ * at this point we expect that the mcu has accepted
+ * our command and is waiting for our new value
+ * please note that maximum brightness is 255,
+ * but due to physical layout it is equal to 0, so we simply
+ * invert the value (MAX VALUE - NEW VALUE).
+ */
+ if (jornada_ssp_byte(BL_MAX_BRIGHT - bd->props.brightness)
+ != TXDUMMY) {
+ dev_err(&bd->dev, "set brightness failed\n");
+ ret = -ETIMEDOUT;
+ }
- /*
- * If infact we get an TXDUMMY as output we are happy and dont
- * make any further comments about it
- */
+ /*
+ * If infact we get an TXDUMMY as output we are happy and dont
+ * make any further comments about it
+ */
out:
jornada_ssp_end();
--
2.29.2
next reply other threads:[~2021-03-22 16:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 16:41 Arnd Bergmann [this message]
2021-03-23 9:34 ` [PATCH] backlight: journada720: fix Wmisleading-indentation warning Daniel Thompson
2021-03-23 9:43 ` Lee Jones
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=20210322164134.827091-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=daniel.thompson@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jingoohan1@gmail.com \
--cc=kristoffer.ericson@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rpurdie@linux.intel.com \
--cc=sam@ravnborg.org \
/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).