From patchwork Wed Feb 16 00:18:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 543667 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BBDEBC433FE for ; Wed, 16 Feb 2022 00:19:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245025AbiBPATe (ORCPT ); Tue, 15 Feb 2022 19:19:34 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:58674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244992AbiBPATU (ORCPT ); Tue, 15 Feb 2022 19:19:20 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5EAB70332; Tue, 15 Feb 2022 16:19:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1644970727; bh=7qzWDUNopK0bho5I5nYj0J78qRs15cAksVO/Q8GWxsw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=eFU5XYTy+SpZQMBcsDZPHFLFN/heaRrGD12W2PBjm6CRz7xdnfZoP8qKfzPPfmuOc 3+6+eam14QnT0azUMnqf/WBAcu7kQiwsONOTFuW/SMqfsadjkX9ieNX/FDot6bU4kA OfiAarqevJrMmzFMdzFEyCjsspbIhflL4hq93ViQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([149.172.237.68]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N6KYl-1oMKQo09Jx-016e1C; Wed, 16 Feb 2022 01:18:47 +0100 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org, u.kleine-koenig@pengutronix.de Cc: linux@armlinux.org.uk, richard.genoud@gmail.com, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, lukas@wunner.de, Lino Sanfilippo Subject: [PATCH 2 9/9] serial: atmel: remove redundant assignment in rs485_config Date: Wed, 16 Feb 2022 01:18:03 +0100 Message-Id: <20220216001803.637-10-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220216001803.637-1-LinoSanfilippo@gmx.de> References: <20220216001803.637-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:zA2TdkclBElvUYZlMDu80hyoLmVC33BJetCeueVe0nw+noQF1V1 L/Ab3lZ4xwopWgLe/eddWpj7m2jLKl0mONq2uA12enhs6iQJxOtpVQrJETJo4TM51LKZ6c0 +Y+sXtpzeFP2FmWNq4E4DBv6OtQJnx4A4iFaBoQHkepgsEcvWh4VjPlJPmvVR2PxWjPRczs f23tAxie8X4MJm+pJhDow== X-UI-Out-Filterresults: notjunk:1;V03:K0:XcvYYdJUjWo=:atOtBcfRRm4xT8HMi31JHV MbZ0MzpH38gakA0WlwxC9/E+/3FI3Z+FityUADReFMjaq3vTJ9I2e1YOyQ8BildGgsuXd2PyZ +AvQxESyYnhUifIsSHX2MWHyJvtWL4WEkDD/KDeyaEIZjcP+hEk778pUGf1Nkrh1RTmzKKw1B Lr37gftv5eooYIwdiR1RQ9yon/wx7d7yYbgFqUTCLp3YN4VhrYgfj6lqgy7pCvhiLHdY30aRm Hm0bkWxevHH2BvoFXGlZ4XdpixJxqB5aWhNMnZel39s5RTkP57rO6vk2c4odwvOPFBN1LH0yQ vlGZGCNK0n4ZqP8T9PzGxdxGkBMHlfeMo8DuDmXCg0x76823YlQzeJ7UYl6CaLDpku7RKEgua zcODuEHFEw3EGfhqnazMtsONy0qbQ1S4Qchw/vV94NRDGQFYTooq8dwzCDUADHUu2K3PQzHPi X3jBGID2ilgamDREi+CNmK/QNlf0iRCcRf4n9eUNCsfkAFBzKjg53h3Sscd+CiyhLS9ZJUPPm HLg1eVHcdvC8RRzSRmF8mQC45aNo//ROuotXzo8XzYM3ebtn3wJ/qb9oLg2ZnbGM0nn5lKAwM JDTXzZgHHmNh1wT6mk39LGoUh5Q+WR9Oo4CWjkMt6Uh8leEOeyPVGTW8onq01k81gTx4rX0b1 /aSibjYS+4qMoptOh/CT/5h5zNmt33okgKLIkPJSWrD477+cU5X2JmvXj8vc9DDCVegtVTPG6 bPvAF7yy+GhSCr0HR8Jft0y2qu3tACB/Mvj6dOPzVm0dkLmu9YZJuUGsBePTOK8O/zL+xXaLV 4nQpcbEPrPai/j7QLPrQ3/urza7oqfCO1WEJ+1l+4VODlSk0VjMkbq2YvpfwAMrzs6k2eOYxP m9VAhPFJQASLD9792OlrxmOuVcDt73IjYVlxlRffIck/0fKnJ5FiozF46os6DBMTDXVlDrnNi BpbCJugA5GMy1hUwNtAaW6axViMSoDL8/TzxtgqZvxLvif6yTKj0jhC2Q4jyTfrty/siL099k CjFptrr3RbHdWUyu1uOgXqDEabjS0WNKBHkjoqzVhI9EDsVw5kp9FKIVtUBhGcqSqIBStgeyg QCIQxHcXHriSmE= Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org 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 --- 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;