From: <Claudiu.Beznea@microchip.com>
To: <LinoSanfilippo@gmx.de>, <gregkh@linuxfoundation.org>,
<jirislaby@kernel.org>, <u.kleine-koenig@pengutronix.de>
Cc: <linux-arm-kernel@lists.infradead.org>,
<alexandre.belloni@bootlin.com>, <mcoquelin.stm32@gmail.com>,
<richard.genoud@gmail.com>, <festevam@gmail.com>,
<s.hauer@pengutronix.de>, <linux@armlinux.org.uk>,
<alexandre.torgue@foss.st.com>, <Ludovic.Desroches@microchip.com>,
<lukas@wunner.de>, <linux-imx@nxp.com>, <kernel@pengutronix.de>,
<linux-serial@vger.kernel.org>, <shawnguo@kernel.org>,
<linux-stm32@st-md-mailman.stormreply.com>,
<linux-kernel@vger.kernel.org>, <p.rosenberger@kunbus.com>
Subject: Re: [PATCH v4 RESEND 9/9] serial: atmel: remove redundant assignment in rs485_config
Date: Mon, 11 Apr 2022 08:27:55 +0000 [thread overview]
Message-ID: <4d301703-bca1-8bda-c66a-ae53890ddac9@microchip.com> (raw)
In-Reply-To: <20220410104642.32195-10-LinoSanfilippo@gmx.de>
On 10.04.2022 13:46, Lino Sanfilippo wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> 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.
>
> Acked-by: Richard Genoud <richard.genoud@gmail.com>
> Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.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 3a45e4fc7993..dd1c7e4bd1c9 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;
> --
> 2.35.1
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-04-11 8:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-10 10:46 Move RS485 implementation from drivers to serial core (v4 RESEND) Lino Sanfilippo
2022-04-10 10:46 ` [PATCH v4 RESEND 1/9] serial: core: move RS485 configuration tasks from drivers into core Lino Sanfilippo
2022-04-10 10:46 ` [PATCH v4 RESEND 2/9] serial: amba-pl011: remove redundant code in rs485_config Lino Sanfilippo
2022-04-10 10:46 ` [PATCH v4 RESEND 3/9] serial: stm32: " Lino Sanfilippo
2022-04-10 10:46 ` [PATCH v4 RESEND 4/9] serial: sc16is7xx: remove redundant check " Lino Sanfilippo
2022-04-10 10:46 ` [PATCH v4 RESEND 5/9] serial: omap: remove redundant code " Lino Sanfilippo
2022-04-10 10:46 ` [PATCH v4 RESEND 6/9] serial: max310: remove redundant memset " Lino Sanfilippo
2022-04-10 10:46 ` [PATCH v4 RESEND 7/9] serial: imx: remove redundant assignment " Lino Sanfilippo
2022-04-10 10:46 ` [PATCH v4 RESEND 8/9] serial: fsl_lpuart: remove redundant code in rs485_config functions Lino Sanfilippo
2022-04-10 10:46 ` [PATCH v4 RESEND 9/9] serial: atmel: remove redundant assignment in rs485_config Lino Sanfilippo
2022-04-11 8:27 ` Claudiu.Beznea [this message]
2022-09-20 11:43 ` Move RS485 implementation from drivers to serial core (v4 RESEND) Lukas Wunner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4d301703-bca1-8bda-c66a-ae53890ddac9@microchip.com \
--to=claudiu.beznea@microchip.com \
--cc=LinoSanfilippo@gmx.de \
--cc=Ludovic.Desroches@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux@armlinux.org.uk \
--cc=lukas@wunner.de \
--cc=mcoquelin.stm32@gmail.com \
--cc=p.rosenberger@kunbus.com \
--cc=richard.genoud@gmail.com \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox