[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251229142349.1251843-8-andriy.shevchenko@linux.intel.com>
Date: Mon, 29 Dec 2025 14:52:40 +0100
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-kernel@...r.kernel.org
Cc: Andy Shevchenko <andy@...nel.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH v1 7/7] auxdisplay: arm-charlcd: Remove redundant ternary operators
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@...ux.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
Powered by blists - more mailing lists