[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAPLW+4mFiuuSGq-ucqsif=qhzWz7p87Na_Q0U6VVopmfhh-=Wg@mail.gmail.com>
Date: Fri, 21 Oct 2022 13:48:14 +0200
From: Sam Protsenko <semen.protsenko@...aro.org>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: linux-serial@...r.kernel.org, Greg KH <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Alim Akhtar <alim.akhtar@...sung.com>,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH 28/44] serial: samsung_tty: Use uart_xmit_advance()
On Wed, 19 Oct 2022 at 11:35, Ilpo Järvinen
<ilpo.jarvinen@...ux.intel.com> wrote:
>
> Take advantage of the new uart_xmit_advance() helper.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
> ---
Reviewed-by: Sam Protsenko <semen.protsenko@...aro.org>
> drivers/tty/serial/samsung_tty.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
> index 77d1363029f5..7e34361a1085 100644
> --- a/drivers/tty/serial/samsung_tty.c
> +++ b/drivers/tty/serial/samsung_tty.c
> @@ -288,7 +288,6 @@ static void s3c24xx_serial_stop_tx(struct uart_port *port)
> {
> struct s3c24xx_uart_port *ourport = to_ourport(port);
> struct s3c24xx_uart_dma *dma = ourport->dma;
> - struct circ_buf *xmit = &port->state->xmit;
> struct dma_tx_state state;
> int count;
>
> @@ -316,8 +315,7 @@ static void s3c24xx_serial_stop_tx(struct uart_port *port)
> DMA_TO_DEVICE);
> async_tx_ack(dma->tx_desc);
> count = dma->tx_bytes_requested - state.residue;
> - xmit->tail = (xmit->tail + count) & (UART_XMIT_SIZE - 1);
> - port->icount.tx += count;
> + uart_xmit_advance(port, count);
> }
>
> ourport->tx_enabled = 0;
> @@ -351,8 +349,7 @@ static void s3c24xx_serial_tx_dma_complete(void *args)
>
> spin_lock_irqsave(&port->lock, flags);
>
> - xmit->tail = (xmit->tail + count) & (UART_XMIT_SIZE - 1);
> - port->icount.tx += count;
> + uart_xmit_advance(port, count);
> ourport->tx_in_progress = 0;
>
> if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
> @@ -916,8 +913,7 @@ static void s3c24xx_serial_tx_chars(struct s3c24xx_uart_port *ourport)
> break;
>
> wr_reg(port, S3C2410_UTXH, xmit->buf[xmit->tail]);
> - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
> - port->icount.tx++;
> + uart_xmit_advance(port, 1);
> count--;
> }
>
> --
> 2.30.2
>
Powered by blists - more mailing lists