]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tty: mmc: sdio: use bool for cts and remove parentheses
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Mon, 17 Mar 2025 07:00:32 +0000 (08:00 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 17 Mar 2025 10:22:06 +0000 (11:22 +0100)
'cts' in sdio_uart_check_modem_status() is considered a 'bool', but
typed as signed 'int'. Make it 'bool' so it is clear the code does not
care about the masked value, but true/false.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20250317070046.24386-18-jirislaby@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/sdio_uart.c

index 6b7471dba3bf4bfc8f415f454f6f04ebc8689560..7423a601e1e592a9cc28255eaafadbacac0fa9f1 100644 (file)
@@ -471,7 +471,7 @@ static void sdio_uart_check_modem_status(struct sdio_uart_port *port)
                port->icount.cts++;
                tty = tty_port_tty_get(&port->port);
                if (tty && C_CRTSCTS(tty)) {
-                       int cts = (status & UART_MSR_CTS);
+                       bool cts = status & UART_MSR_CTS;
                        if (tty->hw_stopped) {
                                if (cts) {
                                        tty->hw_stopped = false;