[PATCH 5/8] serial: imx: remove redundant USR2 read from FIFO reading loop
Ilpo Järvinen
ilpo.jarvinen at linux.intel.com
Mon Jan 16 02:50:35 PST 2023
On Fri, 13 Jan 2023, Sergey Organov wrote:
> There is no need to read USR2 twice at every loop iteration: get rid of the
> second read.
>
> Signed-off-by: Sergey Organov <sorganov at gmail.com>
> ---
> drivers/tty/serial/imx.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index b96b0edc7854..c44a7293c013 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -904,7 +904,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))
>
I was already wondering why it's read more than once.
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen at linux.intel.com>
--
i.
More information about the linux-arm-kernel
mailing list