From patchwork Sun Jul 3 17:00:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 12904412 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 39687C433EF for ; Sun, 3 Jul 2022 17:03:28 +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=Q7erC9Fk9nErO4Ss5RgLiHAOxs3BfnhG04dD6OQFrzc=; b=xaTuoyukQZUIcm NEEw1HGilanzI8tyyW0HCXoUalnWXQSDOfKVgJ4NMXewc0y81z+3dXRO0a8+HzIai5/XWc1jZyM8l 3M2jwuX9vuCWRSJUeQ1teYT8fJPmNAJzQVSsHkFnWNwD7XYiSMYQ9x3Eb3NDnAgdMuUS3hMTuLzX2 I+JXwaTdGjPJW65r4d4KQkx2KduGM9YiD4HiHS0PTEpOaoa9GLmERaqkmj2oPaGTAm7IqNu9J/7De 9fKMRWuqHhGs0iC7Iz4YQrgo9ZE2wHuJnPQaDpFXNMyQoYUUUyNpHUMxcGKxQRv8wN4otSneMjjtI Yf/96thIy1CsWflywNkA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o82z9-00HMim-7q; Sun, 03 Jul 2022 17:02:15 +0000 Received: from mout.gmx.net ([212.227.15.18]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o82yf-00HMRF-3I for linux-arm-kernel@lists.infradead.org; Sun, 03 Jul 2022 17:01:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1656867693; bh=r3dNDUDIuUE3Q0qRG27sRGL8QSUVi1dKmu2o/TP38+o=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=IrAd30hI+KUcO22l6V3kbwW5xHgsijSs1p/i71c27LXUsdMOpa0ypTKskAHkDFHpj JE/09dEVOj9gGtf7+J2t/ZqJyOpZUjJpM5FA1195w5TIH9wL6esbljwXYQL4PRcvLB WQyMBuSrwWdviCLV4NsgrRp/f5h69xVNUikzLV18= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([46.223.3.210]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M5QJD-1o8sJs2ocP-001Oya; Sun, 03 Jul 2022 19:01:33 +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 v2 9/9] serial: 8250: lpc18xx: Remove redundant sanity check for RS485 flags Date: Sun, 3 Jul 2022 19:00:39 +0200 Message-Id: <20220703170039.2058202-10-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220703170039.2058202-1-LinoSanfilippo@gmx.de> References: <20220703170039.2058202-1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u3jlt2m8Mc4P1hzY7bF924o6/Q6V5kSX5os8/S5uygtT/O8NjWCrfpSHIYvA ttZh7Kuiuasvf5BU3ZwBriZXY+oPOYCSO/aNB9B/BmmFpdJYcSVZTYKxqcbM2qY/sbazuHT94 uKvBfT88apH4yV1gcuhKhapJfubzTZl0DF46zvBeH89MH7ohbCBE/8tAJDUi5lkPNEYBboYuP IkUAB7IH7MJFUvrbj7S7wI4HGgW2TNPi+IvwqXAwfbJbuyw4/fXty4WBMHthI46HvQnULV1l4 N617UjZIHNOtqa1OkMSiAlUb3GPobKsTfHmbGXaziwEo8xCgHURaTxPLbz8vaAfpZ4Jyr7OFm 7yElBeI/pR2ocJKJx826lpW4oRhiwYe0BsN/13CYajy+gHb9xgBdcVngw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220703_100145_473699_1A3DA0CB X-CRM114-Status: GOOD ( 11.56 ) 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 d7cb3bb52069..fba0bb17e536 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) {