public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] serial: 8250_dma: Convert to use uart_xmit_advance()
@ 2022-09-09  9:11 Andy Shevchenko
  2022-09-09  9:16 ` Ilpo Järvinen
  2022-09-22 14:10 ` Greg Kroah-Hartman
  0 siblings, 2 replies; 8+ messages in thread
From: Andy Shevchenko @ 2022-09-09  9:11 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Ilpo Järvinen, linux-serial,
	linux-kernel
  Cc: Jiri Slaby, Andy Shevchenko

uart_xmit_advance() provides a common way on how to advance
the Tx queue. Use it for the sake of unification and robustness.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/tty/serial/8250/8250_dma.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
index d99020fd3427..b85c82616e8c 100644
--- a/drivers/tty/serial/8250/8250_dma.c
+++ b/drivers/tty/serial/8250/8250_dma.c
@@ -26,9 +26,7 @@ static void __dma_tx_complete(void *param)
 
 	dma->tx_running = 0;
 
-	xmit->tail += dma->tx_size;
-	xmit->tail &= UART_XMIT_SIZE - 1;
-	p->port.icount.tx += dma->tx_size;
+	uart_xmit_advance(&p->port, dma->tx_size);
 
 	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
 		uart_write_wakeup(&p->port);
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-09-25  7:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-09  9:11 [PATCH v1 1/1] serial: 8250_dma: Convert to use uart_xmit_advance() Andy Shevchenko
2022-09-09  9:16 ` Ilpo Järvinen
2022-09-09 10:17   ` Andy Shevchenko
2022-09-22 14:10 ` Greg Kroah-Hartman
2022-09-22 14:24   ` Ilpo Järvinen
2022-09-22 14:33     ` Greg Kroah-Hartman
2022-09-22 15:03       ` Andy Shevchenko
2022-09-25  7:28         ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox