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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <208ff62b-c6c0-4b2c-250c-7951f422ba54@mleia.com>
Date:   Wed, 4 Nov 2020 22:04:46 +0200
From:   Vladimir Zapolskiy <vz@...ia.com>
To:     Lee Jones <lee.jones@...aro.org>
Cc:     linux-kernel@...r.kernel.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        Sylvain Lemieux <slemieux.tyco@...il.com>,
        Kevin Wells <kevin.wells@....com>,
        Roland Stigge <stigge@...com.de>, linux-serial@...r.kernel.org
Subject: Re: [PATCH 19/36] tty: serial: lpc32xx_hs: Remove unused variable
 'tmp'

Hi Lee,

On 11/4/20 9:35 PM, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
> 
>   drivers/tty/serial/lpc32xx_hs.c: In function ‘__serial_uart_flush’:
>   drivers/tty/serial/lpc32xx_hs.c:244:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable]
> 
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Cc: Jiri Slaby <jirislaby@...nel.org>
> Cc: Vladimir Zapolskiy <vz@...ia.com>
> Cc: Sylvain Lemieux <slemieux.tyco@...il.com>
> Cc: Kevin Wells <kevin.wells@....com>
> Cc: Roland Stigge <stigge@...com.de>
> Cc: linux-serial@...r.kernel.org
> Signed-off-by: Lee Jones <lee.jones@...aro.org>
> ---
>   drivers/tty/serial/lpc32xx_hs.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/lpc32xx_hs.c b/drivers/tty/serial/lpc32xx_hs.c
> index b5898c9320361..1fa098d7aec4b 100644
> --- a/drivers/tty/serial/lpc32xx_hs.c
> +++ b/drivers/tty/serial/lpc32xx_hs.c
> @@ -241,12 +241,11 @@ static unsigned int __serial_get_clock_div(unsigned long uartclk,
>   
>   static void __serial_uart_flush(struct uart_port *port)
>   {
> -	u32 tmp;
>   	int cnt = 0;
>   
>   	while ((readl(LPC32XX_HSUART_LEVEL(port->membase)) > 0) &&
>   	       (cnt++ < FIFO_READ_LIMIT))
> -		tmp = readl(LPC32XX_HSUART_FIFO(port->membase));
> +		readl(LPC32XX_HSUART_FIFO(port->membase));
>   }
>   
>   static void __serial_lpc32xx_rx(struct uart_port *port)
> 

Thank you for the change.

Acked-by: Vladimir Zapolskiy <vz@...ia.com>

I'm sure the change is correct, likely the local variable was introduced
to prevent an unwanted probable optimization by some odd/ancient compiler.

--
Best wishes,
Vladimir

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ