summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/imx.c
diff options
context:
space:
mode:
authorSergey Organov <sorganov@gmail.com>2023-02-01 17:27:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-08 13:12:07 +0100
commit2af4b918848b4102f0bf5761057e2506258e0bb8 (patch)
tree348c10c1f304ca495c45d4d86018396243e59bf9 /drivers/tty/serial/imx.c
parent53701b6d2ce7202cff88943ee812917c896a8e90 (diff)
serial: imx: refine local variables in rxint()
The 'rx' is chip register, similar to 'usr2', so let it be of 'u32' type as well. Move 'flg' to be FIFO read loop local as it's not used outside. Signed-off-by: Sergey Organov <sorganov@gmail.com> Link: https://lore.kernel.org/r/20230201142700.4346-8-sorganov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/imx.c')
-rw-r--r--drivers/tty/serial/imx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index a662f48a2146..e2a89b920637 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -890,9 +890,8 @@ static void imx_uart_check_flood(struct imx_port *sport, u32 usr2)
static irqreturn_t __imx_uart_rxint(int irq, void *dev_id)
{
struct imx_port *sport = dev_id;
- unsigned int rx, flg;
struct tty_port *port = &sport->port.state->port;
- u32 usr2;
+ u32 usr2, rx;
/* If we received something, check for 0xff flood */
usr2 = imx_uart_readl(sport, USR2);
@@ -900,7 +899,7 @@ static irqreturn_t __imx_uart_rxint(int irq, void *dev_id)
imx_uart_check_flood(sport, usr2);
while ((rx = imx_uart_readl(sport, URXD0)) & URXD_CHARRDY) {
- flg = TTY_NORMAL;
+ unsigned int flg = TTY_NORMAL;
sport->port.icount.rx++;
if (unlikely(rx & URXD_ERR)) {