2022-11-18 15:04:22

by Gabriel L. Somlo

[permalink] [raw]
Subject: [PATCH v5 08/14] serial: liteuart: simplify passing of uart_insert_char() flag

Simply provide the hard-coded TTY_NORMAL flag to uart_insert_char()
directly -- no need to dedicate a variable for that exclusive purpose.

Signed-off-by: Gabriel Somlo <[email protected]>
Reviewed-by: Ilpo Järvinen <[email protected]>
---
drivers/tty/serial/liteuart.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/serial/liteuart.c b/drivers/tty/serial/liteuart.c
index c90ab65fbdcf..81aa7c1da73c 100644
--- a/drivers/tty/serial/liteuart.c
+++ b/drivers/tty/serial/liteuart.c
@@ -73,7 +73,6 @@ static void liteuart_timer(struct timer_list *t)
struct liteuart_port *uart = from_timer(uart, t, timer);
struct uart_port *port = &uart->port;
unsigned char __iomem *membase = port->membase;
- unsigned int flg = TTY_NORMAL;
int ch;
unsigned long status;

@@ -86,7 +85,7 @@ static void liteuart_timer(struct timer_list *t)

/* no overflow bits in status */
if (!(uart_handle_sysrq_char(port, ch)))
- uart_insert_char(port, status, 0, ch, flg);
+ uart_insert_char(port, status, 0, ch, TTY_NORMAL);
}

tty_flip_buffer_push(&port->state->port);
--
2.38.1



2022-11-21 10:46:21

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH v5 08/14] serial: liteuart: simplify passing of uart_insert_char() flag

On Fri, Nov 18, 2022 at 3:56 PM Gabriel Somlo <[email protected]> wrote:
> Simply provide the hard-coded TTY_NORMAL flag to uart_insert_char()
> directly -- no need to dedicate a variable for that exclusive purpose.
>
> Signed-off-by: Gabriel Somlo <[email protected]>
> Reviewed-by: Ilpo Järvinen <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds