]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
auxdisplay: arm-charlcd: Remove redundant ternary operators
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 29 Dec 2025 13:51:19 +0000 (14:51 +0100)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 29 Dec 2025 13:52:19 +0000 (14:52 +0100)
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

index 7395a6dd6dc9e4e737619bbe52750b5d8a677227..30fd2341c628b523cbb060ca2f58ea7edfedc678 100644 (file)
@@ -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)