Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: omap-serial: remove flag from serial_omap_rdi()

The local 'flag' variable carries only TTY_NORMAL. So use that constant
directly and drop the variable.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20230712081811.29004-10-jirislaby@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jiri Slaby and committed by
Greg Kroah-Hartman
4d1fceb1 29ec63ef

+1 -3
+1 -3
drivers/tty/serial/omap-serial.c
··· 499 499 static void serial_omap_rdi(struct uart_omap_port *up, unsigned int lsr) 500 500 { 501 501 unsigned char ch = 0; 502 - unsigned int flag; 503 502 504 503 if (!(lsr & UART_LSR_DR)) 505 504 return; ··· 511 512 return; 512 513 } 513 514 514 - flag = TTY_NORMAL; 515 515 up->port.icount.rx++; 516 516 517 517 if (uart_handle_sysrq_char(&up->port, ch)) 518 518 return; 519 519 520 - uart_insert_char(&up->port, lsr, UART_LSR_OE, ch, flag); 520 + uart_insert_char(&up->port, lsr, UART_LSR_OE, ch, TTY_NORMAL); 521 521 } 522 522 523 523 /**