mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
serial: pch_uart: CIRC_CNT_TO_END() is enough
Testing also CIRC_CNT() with CIRC_CNT_TO_END() is unnecessary because to latter alone covers all necessary cases. Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220823141839.165244-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
575ca2cb89
commit
1a9a591046
1 changed files with 1 additions and 3 deletions
|
@ -898,9 +898,7 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)
|
|||
fifo_size--;
|
||||
}
|
||||
|
||||
bytes = min((int)CIRC_CNT(xmit->head, xmit->tail,
|
||||
UART_XMIT_SIZE), CIRC_CNT_TO_END(xmit->head,
|
||||
xmit->tail, UART_XMIT_SIZE));
|
||||
bytes = CIRC_CNT_TO_END(xmit->head, xmit->tail, UART_XMIT_SIZE);
|
||||
if (!bytes) {
|
||||
dev_dbg(priv->port.dev, "%s 0 bytes return\n", __func__);
|
||||
pch_uart_hal_disable_interrupt(priv, PCH_UART_HAL_TX_INT);
|
||||
|
|
Loading…
Reference in a new issue