aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTudor Ambarus <[email protected]>2024-01-19 10:45:20 +0000
committerGreg Kroah-Hartman <[email protected]>2024-01-27 19:05:19 -0800
commitece5cc2ac1e665d936d3c795bab55aeee743bca6 (patch)
treec86a8d6eb2aebf6665294e253cc88c85737bc5fb
parentb3296e7681d80c95432ad04263ac24ad61664b9a (diff)
tty: serial: samsung: don't compare with zero an if (bitwise expression)
The bitwise AND with the fifo mask is used to check if the fifo is empty or not, it doesn't care about the length, thus the comparison with zero is implicit. Rely on the implicit comparison instead. Reviewed-by: Sam Protsenko <[email protected]> Signed-off-by: Tudor Ambarus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/tty/serial/samsung_tty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index f8a8b459a86b..333ffa3a76a3 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -988,7 +988,7 @@ static unsigned int s3c24xx_serial_tx_empty(struct uart_port *port)
u32 ufcon = rd_regl(port, S3C2410_UFCON);
if (ufcon & S3C2410_UFCON_FIFOMODE) {
- if ((ufstat & info->tx_fifomask) != 0 ||
+ if ((ufstat & info->tx_fifomask) ||
(ufstat & info->tx_fifofull))
return 0;
return TIOCSER_TEMT;