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

serial: arc_uart: Use uart_circ_empty() for open-coded comparison

Replace open-coded test for empty tx ring buffer with equivalent
helper function, uart_circ_empty(). No functional change.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Peter Hurley and committed by
Greg Kroah-Hartman
99ecb001 c557d392

+1 -1
+1 -1
drivers/tty/serial/arc_uart.c
··· 177 177 uart->port.icount.tx++; 178 178 uart->port.x_char = 0; 179 179 sent = 1; 180 - } else if (xmit->tail != xmit->head) { /* TODO: uart_circ_empty */ 180 + } else if (!uart_circ_empty(xmit)) { 181 181 ch = xmit->buf[xmit->tail]; 182 182 xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); 183 183 uart->port.icount.tx++;