From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andy@kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH v1 7/7] auxdisplay: arm-charlcd: Remove redundant ternary operators
Date: Mon, 29 Dec 2025 14:52:40 +0100 [thread overview]
Message-ID: <20251229142349.1251843-8-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20251229142349.1251843-1-andriy.shevchenko@linux.intel.com>
For ternary operators in the form of a ? true : false, if a itself returns
a boolean result, the ternary operator can be omitted. Remove redundant
ternary operators to clean up the code.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/auxdisplay/arm-charlcd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-charlcd.c
index 7395a6dd6dc9..30fd2341c628 100644
--- a/drivers/auxdisplay/arm-charlcd.c
+++ b/drivers/auxdisplay/arm-charlcd.c
@@ -157,7 +157,8 @@ static bool charlcd_4bit_read_bf(struct charlcd *lcd)
writel(0x01, lcd->virtbase + CHAR_MASK);
}
readl(lcd->virtbase + CHAR_COM);
- return charlcd_4bit_read_char(lcd) & HD_BUSY_FLAG ? true : false;
+
+ return charlcd_4bit_read_char(lcd) & HD_BUSY_FLAG;
}
static void charlcd_4bit_wait_busy(struct charlcd *lcd)
--
2.50.1
next prev parent reply other threads:[~2025-12-29 14:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-29 13:52 [PATCH v1 0/7] auxdisplay: arm-charlcd: refactor with modern APIs Andy Shevchenko
2025-12-29 13:52 ` [PATCH v1 1/7] auxdisplay: arm-charlcd: convert to use device managed APIs Andy Shevchenko
2025-12-29 13:52 ` [PATCH v1 2/7] auxdisplay: arm-charlcd: Remove unneeded info message Andy Shevchenko
2025-12-29 13:52 ` [PATCH v1 3/7] auxdisplay: arm-charlcd: drop of_match_ptr() Andy Shevchenko
2025-12-29 13:52 ` [PATCH v1 4/7] auxdisplay: arm-charlcd: Don't use "proxy" headers Andy Shevchenko
2025-12-29 13:52 ` [PATCH v1 5/7] auxdisplay: arm-charlcd: Use readl_poll_timeout Andy Shevchenko
2025-12-29 13:52 ` [PATCH v1 6/7] auxdisplay: arm-charlcd: Join string literals back Andy Shevchenko
2025-12-29 13:52 ` Andy Shevchenko [this message]
2026-01-07 21:06 ` [PATCH v1 0/7] auxdisplay: arm-charlcd: refactor with modern APIs Andy Shevchenko
2026-01-07 21:08 ` Andy Shevchenko
2026-01-09 11:30 ` Andy Shevchenko
2026-01-09 14:29 ` Linus Walleij
2026-01-09 16:15 ` Andy Shevchenko
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=20251229142349.1251843-8-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=andy@kernel.org \
--cc=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®