tty: omap-serial: remove set but unused variable

Fix the following warning:
drivers/tty/serial/omap-serial.c: In function serial_omap_rlsi:
drivers/tty/serial/omap-serial.c:496:16: warning: variable ch set but not used [-Wunused-but-set-variable]

The character read is useless according to the table 23-246 of the omap4
TRM. So we can drop it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Link: https://lore.kernel.org/r/1575617863-32484-1-git-send-email-wangxiongfeng2@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Xiongfeng Wang 2019-12-06 15:37:43 +08:00 committed by Greg Kroah-Hartman
parent e42617b825
commit e83c6587c4

View file

@ -493,10 +493,13 @@ static unsigned int check_modem_status(struct uart_omap_port *up)
static void serial_omap_rlsi(struct uart_omap_port *up, unsigned int lsr)
{
unsigned int flag;
unsigned char ch = 0;
/*
* Read one data character out to avoid stalling the receiver according
* to the table 23-246 of the omap4 TRM.
*/
if (likely(lsr & UART_LSR_DR))
ch = serial_in(up, UART_RX);
serial_in(up, UART_RX);
up->port.icount.rx++;
flag = TTY_NORMAL;