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] [day] [month] [year] [list]
Date:   Wed, 19 May 2021 11:45:54 +0200
From:   Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
To:     Johan Hovold <johan@...nel.org>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Jiri Slaby <jirislaby@...nel.org>,
        linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] serial: drop irq-flags initialisations

On Wed, May 19, 2021 at 11:25:41AM +0200, Johan Hovold wrote:
> There's no need to initialise irq-flags variables before saving the
> interrupt state.
> 
> Drop the redundant initialisations from drivers that got this wrong.
> 
> Signed-off-by: Johan Hovold <johan@...nel.org>
> ---
>  drivers/tty/serial/amba-pl011.c    |  2 +-
>  drivers/tty/serial/imx.c           |  2 +-
>  drivers/tty/serial/omap-serial.c   | 10 +++++-----
>  drivers/tty/serial/serial_core.c   |  4 ++--
>  drivers/tty/serial/st-asc.c        |  2 +-
>  drivers/tty/serial/stm32-usart.c   |  2 +-
>  drivers/tty/serial/xilinx_uartps.c |  8 ++++----
>  7 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index 78682c12156a..e14f3378b8a0 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -1062,7 +1062,7 @@ static void pl011_dma_rx_poll(struct timer_list *t)
>  	struct tty_port *port = &uap->port.state->port;
>  	struct pl011_dmarx_data *dmarx = &uap->dmarx;
>  	struct dma_chan *rxchan = uap->dmarx.chan;
> -	unsigned long flags = 0;
> +	unsigned long flags;
>  	unsigned int dmataken = 0;
>  	unsigned int size = 0;
>  	struct pl011_sgbuf *sgbuf;
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index 7d5a8dfa3e91..4b838601cdce 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -1975,8 +1975,8 @@ imx_uart_console_write(struct console *co, const char *s, unsigned int count)
>  {
>  	struct imx_port *sport = imx_uart_ports[co->index];
>  	struct imx_port_ucrs old_ucr;
> +	unsigned long flags;
>  	unsigned int ucr1;
> -	unsigned long flags = 0;
>  	int locked = 1;
>  
>  	if (sport->port.sysrq)

Apart from changing the order here being unnecessary, the patch looks
right. Ditto for serial_core.c and xilinx_uartps.c.
I don't care much though, so

Acked-by: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ