]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
serial: sc16is7xx: drop redundant conversion to bool
authorXichao Zhao <zhao.xichao@vivo.com>
Wed, 27 Aug 2025 02:45:14 +0000 (10:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Sep 2025 13:48:34 +0000 (15:48 +0200)
The result of integer comparison already evaluates to bool. No need for
explicit conversion.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Link: https://lore.kernel.org/r/20250827024514.76149-1-zhao.xichao@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sc16is7xx.c

index 3f38fba8f6ea5d8807ad60251e034aebb8ac1f2f..11744306b1dedc4d8fac8e01099e9688b04352fe 100644 (file)
@@ -626,7 +626,7 @@ static void sc16is7xx_handle_rx(struct uart_port *port, unsigned int rxlen,
 {
        struct sc16is7xx_one *one = to_sc16is7xx_one(port, port);
        unsigned int lsr = 0, bytes_read, i;
-       bool read_lsr = (iir == SC16IS7XX_IIR_RLSE_SRC) ? true : false;
+       bool read_lsr = (iir == SC16IS7XX_IIR_RLSE_SRC);
        u8 ch, flag;
 
        if (unlikely(rxlen >= sizeof(one->buf))) {