From patchwork Sun Jul 10 15:03:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 12912558 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 4CD51C43334 for ; Sun, 10 Jul 2022 15:05:20 +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=aGOcDE3orRNAIP fZQ1pp6dzU++FXGwZ9EkmipP7m7yahDScga2Wmv95tsYpbZpoxKxLZ9D0kLFzyoAsBjnDD3Y8yQ86 aujYhmGBkUYZiNAM8f56k6atBddOTzcYLyWCp9Cn0J/djiQ0R/sye1RdC6F5eoy1arNk7KFBFPRp2 tRy7DWGHdoYitNNYt0F8vrfu+wCHlRSQTr15zcj3gWHNrMfZ3Mx1UPvKIyfApNTcnj9+Plc9Vljrv yIeUYeYX4DMkIP4NFOxRtb27NK8PL3JQ+YRGvaSTHtRhFFkOoUdw/D1wz8C+HdXxd1Bwd5kjJNGPa 7q3H5/PpvhgeU1ZI8j8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAYTs-00C8Oq-MI; Sun, 10 Jul 2022 15:04:20 +0000 Received: from mout.gmx.net ([212.227.15.19]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oAYTG-00C89h-RL for linux-arm-kernel@lists.infradead.org; Sun, 10 Jul 2022 15:03:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1657465413; bh=0HR3Zv5yqKQt68jtTzgddRrz6zgVoGHjCf/opyPjVSw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=C/G0Dw7qLGqe4pItHN7TBRQgbs/PiZ6WZmsjY77bzdOy8aRoex3cAlp/o+l8oDNKT 1VoTaZg65/UBaeghR3QT4R0ODfTiXEwtJfWQ3XRD3K+ziqk/l5Or7iBOKowu8TJlSL QeVgD/QnMuqu+ezRQdUkR2ylpQyLONjApqfcubFM= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([46.223.3.243]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MbzyP-1nZq8p3OYB-00dVRC; Sun, 10 Jul 2022 17:03:32 +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 v3 8/8] serial: 8250: lpc18xx: Remove redundant sanity check for RS485 flags Date: Sun, 10 Jul 2022 17:03:22 +0200 Message-Id: <20220710150322.2846170-9-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220710150322.2846170-1-LinoSanfilippo@gmx.de> References: <20220710150322.2846170-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:qzHu4PvDz5P895faBhT9BuPeJF1PRRW2iLbjX8PmLgdI3/snLgi OxgKGpRySgUOvEjEysXvo6BSJ+waB04FeaK9eEMhMcIphKa1UL3KezetcBHkQt8dhMZRqkh wE5d2J57eK7Q6oDU46JdGPpdgW+StgBq6HYTJkzdeTri8RZQS4Cxx6PG/iLTzyqz4qKuln9 uqZ3mslLu/zf1Nmp7t7ng== X-UI-Out-Filterresults: notjunk:1;V03:K0:8RXqQFDDp2Y=:h0kmsp5HdQeZBg5mCa/jYk nCEoVbztb6K5MOvE5NwHK/QFB/XXRNsHL/zRXpmg0+35ERHRPnM8IFB9OhDhqaZ1o5CDVrNXr t6jyVaSibtvBU67ujv+tZUxjHUc31nSN7+pymtbzwaujGoR6yU5oBZ0mlfBeGMWBt/bc2gLEa HmhRqedM40KDObOWJ6CjahS6gjlHmDqHcNmn1aIt/z8BJ8lza2lzVaqBvFg1AVrWwKeqLA9Rx Tu26xjmzAfYhCxB8JO1pvNC9QfQ+tsNGqgl+87jQqlavkanVSv2MI+k/NWme+hfTzJRFG+Plu GFL3uozPyYGZdR8zFjjWgfqoo4YSSO3JlcXCSE+xGeSdN7BbnYdhLccp8Ohkv8GKh2YBdy3uQ nLimuRhpRkk4QYUtE5rgdvoYC0zZZ1ap9WDiWqhcHLUYPNhIJlb+LSosWZHTl8eSf0RAokyrx y0zYRR9yfoSEAsWecSKdFlC+VzOyafpEhxJqcsOWQOJOVlJlRAeW5W31qXGj70PAKzMXMWu9R DTXiy4M8H+ckuIdF/KFunJlVQk0nzkPppR+wcq+4S4D12jps8joOxRfEBn/INlJgB5gXtDov8 JLrh0Nz0K64wD1XKuRdMoPHw0IMV+v92xaf4fjkCO8ZxOGlmw0kna/qD0sef022BQX/+tode9 LiU8gXHX7W+62xiFCZ8tF2bW/1bKzu9pf3wlW7XgaokQJ72NBP80GWKKoPdiuaN5KetdYHaId SLWkSWMbK5nGiyTONxoOa85SEIXx1OwBl16NffFXqGR6wQhOY6/RtR5CwlzC9DVxxS/5CHfRK 3CltWHs5mnqogsH/JeYG6tjJHZLY4w89+5fhxx7WcGaOvAL/tHCSTYqLfrIWwD/N20I53Uffy +B+17T9IBVkCt+m3jrOCr8dTj76yAgrTOEzKwxA/wADi9/mkjAq7TlOqqNYwFFPpwFml6pj6H eoMbfinI0tp37P5i/4Eat5Lf98sMFe8IvSOp+0XuGIeB4vIgaQ7d/mRWPExr/uidpKVIOITgH G4pa20OwDZa9sHuqd/Mc0lTOPviDIRoXQ/tFU82vdv8NZjt611UsHjPv+X4JlYoJSiNd3t1+G 6wTklg+guCEyxOfjUmdth6VCWnth1ZQtWpBWqnnJI3PiGlT4W7Bfy0LgA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220710_080343_220790_D5E57CD2 X-CRM114-Status: GOOD ( 11.35 ) 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) {