lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5ec4a475-b800-7ef9-8edc-605d4d17bbaa@linux.alibaba.com>
Date:   Wed, 19 Oct 2022 18:49:45 +0800
From:   Baolin Wang <baolin.wang@...ux.alibaba.com>
To:     Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
        linux-serial@...r.kernel.org, Greg KH <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        Orson Zhai <orsonzhai@...il.com>,
        Chunyan Zhang <zhang.lyra@...il.com>,
        linux-kernel@...r.kernel.org
Cc:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH 33/44] serial: sprd: Use uart_xmit_advance()

Hi,

On 10/19/2022 5:11 PM, Ilpo Järvinen wrote:
> Take advantage of the new uart_xmit_advance() helper.
> 
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>

LGTM. Thanks.
Reviewed-by: Baolin Wang <baolin.wang@...ux.alibaba.com>

> ---
>   drivers/tty/serial/sprd_serial.c | 7 ++-----
>   1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c
> index 342a87967631..eae700809342 100644
> --- a/drivers/tty/serial/sprd_serial.c
> +++ b/drivers/tty/serial/sprd_serial.c
> @@ -206,7 +206,6 @@ static void sprd_stop_tx_dma(struct uart_port *port)
>   {
>   	struct sprd_uart_port *sp =
>   		container_of(port, struct sprd_uart_port, port);
> -	struct circ_buf *xmit = &port->state->xmit;
>   	struct dma_tx_state state;
>   	u32 trans_len;
>   
> @@ -215,8 +214,7 @@ static void sprd_stop_tx_dma(struct uart_port *port)
>   	dmaengine_tx_status(sp->tx_dma.chn, sp->tx_dma.cookie, &state);
>   	if (state.residue) {
>   		trans_len = state.residue - sp->tx_dma.phys_addr;
> -		xmit->tail = (xmit->tail + trans_len) & (UART_XMIT_SIZE - 1);
> -		port->icount.tx += trans_len;
> +		uart_xmit_advance(port, trans_len);
>   		dma_unmap_single(port->dev, sp->tx_dma.phys_addr,
>   				 sp->tx_dma.trans_len, DMA_TO_DEVICE);
>   	}
> @@ -253,8 +251,7 @@ static void sprd_complete_tx_dma(void *data)
>   	dma_unmap_single(port->dev, sp->tx_dma.phys_addr,
>   			 sp->tx_dma.trans_len, DMA_TO_DEVICE);
>   
> -	xmit->tail = (xmit->tail + sp->tx_dma.trans_len) & (UART_XMIT_SIZE - 1);
> -	port->icount.tx += sp->tx_dma.trans_len;
> +	uart_xmit_advance(port, sp->tx_dma.trans_len);
>   
>   	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
>   		uart_write_wakeup(port);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ