[31/44] serial: tegra: Use uart_xmit_advance()

Message ID 20221019091151.6692-32-ilpo.jarvinen@linux.intel.com
State New
Headers
Series serial: Convert drivers to use uart_xmit_advance() |

Commit Message

Ilpo Järvinen Oct. 19, 2022, 9:11 a.m. UTC
  Take advantage of the new uart_xmit_advance() helper.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
---
 drivers/tty/serial/serial-tegra.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Comments

Thierry Reding Oct. 19, 2022, 5:05 p.m. UTC | #1
On Wed, Oct 19, 2022 at 12:11:38PM +0300, Ilpo Järvinen wrote:
> Take advantage of the new uart_xmit_advance() helper.
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> ---
>  drivers/tty/serial/serial-tegra.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Looks good:

Reviewed-by: Thierry Reding <treding@nvidia.com>
  

Patch

diff --git a/drivers/tty/serial/serial-tegra.c b/drivers/tty/serial/serial-tegra.c
index b7170cb9a544..4304e3f9307d 100644
--- a/drivers/tty/serial/serial-tegra.c
+++ b/drivers/tty/serial/serial-tegra.c
@@ -496,8 +496,7 @@  static void tegra_uart_fill_tx_fifo(struct tegra_uart_port *tup, int max_bytes)
 				break;
 		}
 		tegra_uart_write(tup, xmit->buf[xmit->tail], UART_TX);
-		xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
-		tup->uport.icount.tx++;
+		uart_xmit_advance(&tup->uport, 1);
 	}
 }