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] [day] [month] [year] [list]
Message-ID: <dae7fa7e-5e74-b5c4-f049-a8f7691d1a20@suse.cz>
Date:   Mon, 29 Oct 2018 08:52:58 +0100
From:   Jiri Slaby <jslaby@...e.cz>
To:     zhong jiang <zhongjiang@...wei.com>, gregkh@...uxfoundation.org
Cc:     linux-kernel@...r.kernel.org, linux-serial@...r.kernel.org
Subject: Re: [PATCH] pch_uart: remove set but not used variable 'tx_empty'

On 23. 10. 18, 15:21, zhong jiang wrote:
> tx_empty is not used after setting its value. It is safe to remove
> the unused variable.
> 
> Signed-off-by: zhong jiang <zhongjiang@...wei.com>

Reviewed-by: Jiri Slaby <jslaby@...e.cz>

> ---
>  drivers/tty/serial/pch_uart.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
> index cb85002..9ed121f 100644
> --- a/drivers/tty/serial/pch_uart.c
> +++ b/drivers/tty/serial/pch_uart.c
> @@ -933,7 +933,6 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)
>  	struct scatterlist *sg;
>  	int nent;
>  	int fifo_size;
> -	int tx_empty;
>  	struct dma_async_tx_descriptor *desc;
>  	int num;
>  	int i;
> @@ -958,11 +957,9 @@ static unsigned int dma_handle_tx(struct eg20t_port *priv)
>  	}
>  
>  	fifo_size = max(priv->fifo_size, 1);
> -	tx_empty = 1;
>  	if (pop_tx_x(priv, xmit->buf)) {
>  		pch_uart_hal_write(priv, xmit->buf, 1);
>  		port->icount.tx++;
> -		tx_empty = 0;
>  		fifo_size--;
>  	}
>  
> 

thanks,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ