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: <b8721c78-e422-7dff-3cf1-7a9bcda6dce3@gmail.com>
Date:   Thu, 17 Feb 2022 10:22:03 +0100
From:   Richard Genoud <richard.genoud@...il.com>
To:     Lino Sanfilippo <LinoSanfilippo@....de>,
        gregkh@...uxfoundation.org, jirislaby@...nel.org,
        u.kleine-koenig@...gutronix.de
Cc:     linux@...linux.org.uk, richard.genoud@...il.com,
        nicolas.ferre@...rochip.com, alexandre.belloni@...tlin.com,
        ludovic.desroches@...rochip.com, shawnguo@...nel.org,
        s.hauer@...gutronix.de, kernel@...gutronix.de, festevam@...il.com,
        linux-imx@....com, mcoquelin.stm32@...il.com,
        alexandre.torgue@...s.st.com, linux-serial@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-stm32@...md-mailman.stormreply.com, lukas@...ner.de
Subject: Re: [PATCH 2 9/9] serial: atmel: remove redundant assignment in
 rs485_config


Le 16/02/2022 à 01:18, Lino Sanfilippo a écrit :
> In uart_set_rs485_config() the serial core already assigns the passed
> serial_rs485 struct to the uart port.
> 
> So remove the assignment from the drivers rs485_config() function to avoid
> redundancy.
> 
> Signed-off-by: Lino Sanfilippo <LinoSanfilippo@....de>
Acked-by: Richard Genoud <richard.genoud@...il.com>

> ---
>   drivers/tty/serial/atmel_serial.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 2d09a89974a2..2ab589a3d86c 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -299,11 +299,9 @@ static int atmel_config_rs485(struct uart_port *port,
>   	/* Resetting serial mode to RS232 (0x0) */
>   	mode &= ~ATMEL_US_USMODE;
>   
> -	port->rs485 = *rs485conf;
> -
>   	if (rs485conf->flags & SER_RS485_ENABLED) {
>   		dev_dbg(port->dev, "Setting UART to RS485\n");
> -		if (port->rs485.flags & SER_RS485_RX_DURING_TX)
> +		if (rs485conf->flags & SER_RS485_RX_DURING_TX)
>   			atmel_port->tx_done_mask = ATMEL_US_TXRDY;
>   		else
>   			atmel_port->tx_done_mask = ATMEL_US_TXEMPTY;

Thanks !

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ