Re: [PATCH] serial: drop irq-flags initialisations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxx>

Best regards
Uwe

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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux