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: 12912572 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 76EAAC43334 for ; Sun, 10 Jul 2022 16:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Dh4jYdN7vLA6qnSilkwmL6xf2C5LxeVBWj8sFqkk9Z8=; b=gDpsHJrp/PoPuU cJylOAImqTZw83VKu5kZuA0m/CA+mctdxYeBk77oYB9Q6FWHM79g0+oUqm9FBVw497SjuydTZ0ODW 7DM4WcRo9SrH006hLjbsbYPhZEBr9x8/MBAh8ZrkvTt/tK4xCGHSLza6+WrVOBhXjdEO1Nq0rkjQX nvoTB0BMXttnxcNhRRqn19SjstvN/iWR1GYYfiSfKe3qaOnLKpZTV07z75hHo+FuedxIYSxR43Qoj L8VK1K8TUtnB3rQlfI1vQhmPwGgMAbx7z94QxTgSRJBsYGCmnUgPHPFdTuvnfazXnrBo3wvIxP7p8 bS65OibEyc3eTfhnEvpg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAa3U-00CXGs-CO; Sun, 10 Jul 2022 16:45:12 +0000 Received: from mout.gmx.net ([212.227.17.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAa3P-00CXCe-FY for linux-arm-kernel@lists.infradead.org; Sun, 10 Jul 2022 16:45:09 +0000 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== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220710_094508_072585_24D82E03 X-CRM114-Status: GOOD ( 11.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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) {