serial: imx: remove redundant USR2 read from FIFO reading loop
authorSergey Organov <sorganov@gmail.com>
Wed, 1 Feb 2023 14:26:58 +0000 (17:26 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Feb 2023 12:12:02 +0000 (13:12 +0100)
There is no need to read USR2 twice at every loop iteration: get rid of the
second read.

Signed-off-by: Sergey Organov <sorganov@gmail.com>
Link: https://lore.kernel.org/r/20230201142700.4346-6-sorganov@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c

index ef0b9d353617b62a6a63214f109ac64a2db7ca2d..c578cdc6d8da5a2e40c881b438297413e5a540fe 100644 (file)
@@ -906,7 +906,6 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id)
 
                rx = imx_uart_readl(sport, URXD0);
 
-               usr2 = imx_uart_readl(sport, USR2);
                if (usr2 & USR2_BRCD) {
                        imx_uart_writel(sport, USR2_BRCD, USR2);
                        if (uart_handle_break(&sport->port))