Skip to contentSkip to conversation

serial: 8250_omap: Convert to use uart_xmit_advance()

PATCH In review Andy Shevchenko 2 participants 3 messages Sep 9, 2022 – Sep 22, 2022 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: 8250_omap: Convert to use uart_xmit_advance()

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

---
 drivers/tty/serial/8250/8250_omap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/tty/serial/8250/8250_omap.c +1 -3
index b43894e15b07..4f4d878dc2fc 100644
@@ -984,9 +984,7 @@ static void omap_8250_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 (priv->delayed_restore) {
 		priv->delayed_restore = 0;
Signature · 1 line
2.35.1
#1 lore raw
Quoted 26 lines · 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.

---
 drivers/tty/serial/8250/8250_omap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/tty/serial/8250/8250_omap.c +1 -3
index b43894e15b07..4f4d878dc2fc 100644
@@ -984,9 +984,7 @@ static void omap_8250_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 (priv->delayed_restore) {
 		priv->delayed_restore = 0;
Signature · 1 line
2.35.1

Breaks the build :(

#2 lore raw
Quoted 1 line · Greg Kroah-Hartman

On Fri, Sep 09, 2022 at 12:12:58PM +0300, Andy Shevchenko wrote:

...

Quoted 1 line

Breaks the build :(

As per other thread, will be sent after v6.1-rc1 is out.

Signature · 2 lines
With Best Regards,
Andy Shevchenko