From patchwork Wed Jun 22 15:46:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 584141 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 E4682C433EF for ; Wed, 22 Jun 2022 15:47:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359484AbiFVPro (ORCPT ); Wed, 22 Jun 2022 11:47:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359075AbiFVPrn (ORCPT ); Wed, 22 Jun 2022 11:47:43 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 208553A5DF; Wed, 22 Jun 2022 08:47:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1655912842; bh=P76JCAoBEwYxagrCxqz0x5UalaF1hec9VzDLAcDAK90=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=gI1K62Ac1Y8Zx3itipz4l03G0B4VpHAqQssoOhMy45OJHJ7d6vl6R48KWA23w5wHX lLpcQtAu5Z9rWcNJ3tME5m7Xum9Y/CA553ucU33xukIAk0a0rh5Ww1jYD9CkfhF0xb OHrcXkxYHMChG59WJajHANGnes5KYp99xt9wn8f8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([46.223.2.22]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N9Mta-1naV942eE0-015Fq4; Wed, 22 Jun 2022 17:47:22 +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 8/8] serial: 8250: lpc18xx: Remove redundant sanity check for RS485 flags Date: Wed, 22 Jun 2022 17:46:59 +0200 Message-Id: <20220622154659.8710-9-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220622154659.8710-1-LinoSanfilippo@gmx.de> References: <20220622154659.8710-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:WKHLwSJiQn/lE+w+iwlvUVlY+hSjpvhwDHxzI/x8AFxyiTj4QCk GTI2fk9fSpQP3EnqiPKgLA/I98tb8vKF0Q4dwXlGNBk+RnRJLkvLOrJCT6JkraJYyX6hvfP vss2kjip1uOIBclB0Issx6scJCOIPxFsNJAMk229SIDjibTBwNB7AZyWoVlB4lRWToVKN2K d8myOgdT/Z2X1ICVbHXYw== X-UI-Out-Filterresults: notjunk:1;V03:K0:iVH+DtPsNl4=:I3yIIZMg6ftu/BPmnCuV47 yr8woBxBq0n/NEkF8Th+CcdZiXC7vlGyp/DN5B2FPGur7o6AD7/UwSCwFC2WWldf3HpK6OraY evL1IQ3wIeTMr5JCtM40+ZHdHTLlcvRwcuCWeGoM/CiQsWG88IrqJofXafcbYofa+QKC/oI9L pmXngFqXuXxjkbJ2PKUg5Rp3Zo85K16r1yP1QghTo1I2xmvY3m/T/Lc3GvKS7J6XIhHHZdYBF 9OzaTIur2dtfwY+Lbl+QGrlsb3ktTV7vodgPnuegX53RClh4IZrvTgmXSM/Y/mQNwLz+zfhBC eMr0c5O1pwibXgELsJcJ8RTCFDQpSuxV2rOXjS+95feRbXLicHC7fFIKDquNnvkH+mwAcnmxz neQzO8FAVdvlwHRC7xyGO0GXMnGK1x9JTDvsnLZ98nCC2K1/myWxTM2FPPOeOTB1ULtIkXbKM hW8k66Tj2b6vHr9QVzNB0AEipTEf64Aeq+MCMfty+xgj9TPu+WeIgn4OjD53jQ0M3cnjCLFSR BMvhayoW0tLe7ByS8THdHvKlVD9cRasuODbeO3jEHj52xUUtXiegDK50ZGp+FQ4qHqCfQenLW iV4Xi9E7umRJQ9hs5pugWESRDR8jSDF9DcM38ZNfaTQaNtG+QAequSopBEmdNawhDl52X8AiD fKbSe3wwSvJ0Z2TwwaZqR3/vjsVEy1WJhkYXgJwO8m2lrcLdAMI17nC6k/qL10m4kyEsyV+u4 IpQbpuAybwIOQ9O3yM2e6m+xfO+r1tAOUxlkzv1ZrRsvrcx00oPNPJrq4zgObvsu/zi76iQZd TeGcZY8stRdVkgGhiDln3yQ5LxmqSWr4i9zIcJFz0zfsobOVbHPx2Wo3c+zp4Qo3d2WvKMC9S qKHcZngglEppklaE/EDJIX83T9lPMDdg2yI9oWCHxLYDvguUFYIg8xcVE0mWIkEQcRILkVxvV k5Ualh/6T56zYez6mbthhUVMnCfMtJCkdAq2PxJbyJYovtnPZpa8Ce8vYjLUKWppwDmK5FHDv JXG7eX2lcdFtWpaHT7R5y6uoXJBngAj48KDaqlLvRd9d+h+2xy63+q/HpgurFGdhAmyCayLSR bDyfDbXYqaQ1UyRrhTcSQwcbo0ELvbYfNOLdMgV/G0PN2Ko6+H/mfLWcA== 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 --- 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 3a1cb51cbc91..21896adeb172 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, 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) {