From patchwork Sun Jul 10 16:44:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 589332 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 121C4C433EF for ; Sun, 10 Jul 2022 16:45:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229513AbiGJQpS (ORCPT ); Sun, 10 Jul 2022 12:45:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbiGJQpR (ORCPT ); Sun, 10 Jul 2022 12:45:17 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EE6511C2D; Sun, 10 Jul 2022 09:45:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1657471498; bh=0HR3Zv5yqKQt68jtTzgddRrz6zgVoGHjCf/opyPjVSw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=igYmmq57v09yY5TCm/EEXRWHE2BDQ0q2qoXUJuwBy5/Fa23GX3Wd3aFauWp+nL5JO jg8RO1c4w/lPru6wVhYj0YqUprMmCb0hZvjmTRzcTUUV4QLRu7ZDopd38tHCEL1hyj qfyiwhta6G3m2H7MIs5Pi+nm20hFVnFqVNoZpFi0= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([46.223.3.243]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Mk0JM-1niAC230BM-00kNno; Sun, 10 Jul 2022 18:44:58 +0200 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org Cc: ilpo.jarvinen@linux.intel.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, andriy.shevchenko@linux.intel.com, vz@mleia.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, lukas@wunner.de, p.rosenberger@kunbus.com, Lino Sanfilippo Subject: [PATCH v4 8/8] serial: 8250: lpc18xx: Remove redundant sanity check for RS485 flags Date: Sun, 10 Jul 2022 18:44:42 +0200 Message-Id: <20220710164442.2958979-9-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220710164442.2958979-1-LinoSanfilippo@gmx.de> References: <20220710164442.2958979-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:utoOmTsnfe/Q24WFmaru+XmVgFVIdOtiXrB3erIIRDRENkVZzm7 edqUoy/EUeaB5WiZx42ILFdtsA8P6fdMkjzqTlE+ty6zC7Qc400H/KX/VG1jcXahq/0+kLr LbDOcrdcpuzoYpQD728PIsNmo7C4mSAefduXs+mpLQFyTn7on/Lc8EAuisOXTobz5/DwKyC 693B854VYP0yoFVDWZMow== X-UI-Out-Filterresults: notjunk:1;V03:K0:KkTfvqotrcM=:GhmoW+RnNyay85NkMwVp11 /izaJC+pMyDx8YtkIu3hzLuTxuZSarXmbIc764KoMtKCvEyX4efCiX2W/N6dRJsNJj8Y+z5Fq LJNDo+bCn+hnY+WOabNKXE9VJeAxDKrGJotvUTToRo12DGGpk+P+KHqUUfMKSiKIzHeG4PJhq QMKC9jG38UQDuI8qFNGERX3qiI7v8QHBAPZnMabCc9zft/w3ldU9WhfsagEqkvPmiWUimVOgt tQAZXsmRHCJfk27RMXgi4yDLOxzGcRN7hRmU88yzDMnW1S2nW9x+rLudH/NruoaeZT3AB6K44 9hgFyONhy9Gh6KBQ2TQ3CXlDa26qdHm/HeTKVm0WhfoVA/SV4DVuJYq6OREMgbXkn3ERRTc7z 7lYswfynj4pdCdaP0QKwyaIe44fGdkmuhRyurKnRVtl8ukv7NUV+/Gb+ZdhUpC2xtp9nUAFdj o0ZxK/1N8lzqi86tuub2ILjDmHllcOr8NiBsulqbLfzpDd5nQudSdQBQA/aPFThemZxsA3xLv vxnqvnJXJeqhrb6w7uhTBrsY0HHUzn7AC7AWkPFDX4DqBALelzgCSQbkQT2rgvuE/88bwJ6Ch kLhnVMRjzgSFEzGOnYpsG2u12eMdCCYJqSfYKWfCxNyJENQTUIOwbhaZlg4KLltTgsuXXWmuq P2wI5fwIcmE9YpXi09viaAdYfVtwDxEChSCxFbT60sovwN59qicqlGKg3IwtY3Trs8R7+3vPA oK2AIdbzcJzaAQE2zAl5lRZAU4XX95JH7jttdEavax0bVtOmxYY0GKnvsjfB1nsSQITB30zMG 1fh6BnA66Y4+vdJwDkq4QsCcBb51tMSCxtGZgseYDoaH0xye605WHM0hSV6jSkMcfCO8eakPh 7jZW09TE4RY7PLXmMrnO5646WaKszx+mo/tcFiZ7h7B5t7a970eoC0uh8e7p1jfQenkJ7y7kJ Bg9eCTHpdGFWfZMAe/lGbGSeLVyjuvINmR8v9ijXB6DJIvS8DG1zb9rxtbDYI1xNzs3316U90 fwuxyu9kP/t20cxrI8rBu4wsy/AF5nBOH6ByyFn6Zb8MKBEzpm73vDVWykLXCfBgVfy5rFCsG vR+UNLqutUVULFiOdTL8ae6PrGVjkZz0FTM89iR8GAJusXeFkuGVNf+ng== Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org From: Lino Sanfilippo Before the drivers rs485_config() function is called the serial core already ensures that only one of both options RTS on send or RTS after send is set. So remove the concerning sanity check in the driver function to avoid redundancy. Signed-off-by: Lino Sanfilippo Reviewed-by: Ilpo Järvinen --- drivers/tty/serial/8250/8250_lpc18xx.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/tty/serial/8250/8250_lpc18xx.c b/drivers/tty/serial/8250/8250_lpc18xx.c index d6ca0d47e9d5..6dc85aaba5d0 100644 --- a/drivers/tty/serial/8250/8250_lpc18xx.c +++ b/drivers/tty/serial/8250/8250_lpc18xx.c @@ -44,12 +44,8 @@ static int lpc18xx_rs485_config(struct uart_port *port, struct ktermios *termios rs485_ctrl_reg |= LPC18XX_UART_RS485CTRL_NMMEN | LPC18XX_UART_RS485CTRL_DCTRL; - if (rs485->flags & SER_RS485_RTS_ON_SEND) { + if (rs485->flags & SER_RS485_RTS_ON_SEND) rs485_ctrl_reg |= LPC18XX_UART_RS485CTRL_OINV; - rs485->flags &= ~SER_RS485_RTS_AFTER_SEND; - } else { - rs485->flags |= SER_RS485_RTS_AFTER_SEND; - } } if (rs485->delay_rts_after_send) {