From patchwork Sun Feb 13 22:27:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 12744709 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 AF10AC4332F for ; Sun, 13 Feb 2022 22:30:08 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=cCKNhnZQFhXH8f6A8EwHJ4gdjgnRA3BP1DVomWTN5Uo=; b=nfpEOXKYZGgEaq /GXGQpuP2XDsMobcnfAOfTqGnm2Xa9l7SXvCV95zPSpTbdyv3+9BkE56cN+jBfhjiSgSO46oLp1EB y5On6pR+SWCNi2xgKaSj0/PO8EUDzQDdeHi/zmiKNSOYljSiwtdObI1+nZLn6FmHcH7P1VkRzEUQW qVth2k5vjeVx9sW9JJ9LdCmX9jrIi3h8RRRP/spy0YX806D71+lqQS4jVrU6YjoZ8E8XzZF3SVVrH NsJtiEmPkkXYpUMPm6XZ7xNZKXPdNsuI+DSl2A2Ahlu2x8mzkZAqCdy1Tka5mrh2ENzUW72viwCdn oL64EFu+ws+pgmTOh9Zw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJNMB-00CceG-LM; Sun, 13 Feb 2022 22:28:35 +0000 Received: from mout.gmx.net ([212.227.17.21]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJNLx-00Cca1-UG for linux-arm-kernel@lists.infradead.org; Sun, 13 Feb 2022 22:28:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1644791287; bh=e4EzhSBd05ZEK5ajCopJGbJXFDfnsrEfcW+jvd6E+EY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=STLst4lAjQO2aaHoXQIhOYARHXJ6XlPxmkJVoAUQjQFRwFsmEa6HK8w9yRlZ2Frq+ X5WKn5OybS/dtVHBUkEF1FbX/+VZF60pvi/pwdCBWWAyMsbJIVkbh8U90UU4E7i8lE iEmlCPQrK0x5ecSF9u62iJZypBMyqMJ21SeXO848= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([149.172.237.68]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MhD6g-1nxP7t2Zs2-00eI2N; Sun, 13 Feb 2022 23:28:07 +0100 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org Subject: [PATCH 4/9] serial: sc16is7xx: remove redundant code in rs485_config Date: Sun, 13 Feb 2022 23:27:32 +0100 Message-Id: <20220213222737.15709-5-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220213222737.15709-1-LinoSanfilippo@gmx.de> References: <20220213222737.15709-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:dCybVK/xN3+Sufq+aIz+9f9d8QRQ5K5pMV3gwc6qC9O0NCSdf1D cunb/0Yy49nK2WJiwnG/+2iYNACFAlKyWdWsfvp1naKMMsRuUqdzTZzl+xqlpHZPw3EmPHH cibXWxB0zOOjR1LwlupJz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RThVmhvzZ01dEZ+YD1DiV0zHJPrFiINE vCmcWAScBZi37Un9UsyuWC1Dx70yr6azZw3b+6+HCi4gbBBMNO9KY+6nVEQX4y1pCjvc2vWM8 M5ADToxSgoxi5sck+1dE7c8YTd5zNGA37Q6A8fmAxwt3W9eyDVd3fVAJMkoZ8Du2LfWVvGp1B V88fCP6jF2XSV8= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_142822_337779_FC904648 X-CRM114-Status: GOOD ( 10.82 ) 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: , Cc: linux-arm-kernel@lists.infradead.org, alexandre.belloni@bootlin.com, mcoquelin.stm32@gmail.com, Lino Sanfilippo , richard.genoud@gmail.com, festevam@gmail.com, s.hauer@pengutronix.de, linux@armlinux.org.uk, alexandre.torgue@foss.st.com, ludovic.desroches@microchip.com, lukas@wunner.de, linux-imx@nxp.com, kernel@pengutronix.de, linux-serial@vger.kernel.org, shawnguo@kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When RS485 is configured by userspace the serial core already checks for valid RTS settings. So remove the check from the implementation of the sc16is7xx drivers rs485_config function to avoid redundancy. Signed-off-by: Lino Sanfilippo --- drivers/tty/serial/sc16is7xx.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 64e7e6c8145f..730f697bb517 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -959,16 +959,6 @@ static int sc16is7xx_config_rs485(struct uart_port *port, struct sc16is7xx_one *one = to_sc16is7xx_one(port, port); if (rs485->flags & SER_RS485_ENABLED) { - bool rts_during_rx, rts_during_tx; - - rts_during_rx = rs485->flags & SER_RS485_RTS_AFTER_SEND; - rts_during_tx = rs485->flags & SER_RS485_RTS_ON_SEND; - - if (rts_during_rx == rts_during_tx) - dev_err(port->dev, - "unsupported RTS signalling on_send:%d after_send:%d - exactly one of RS485 RTS flags should be set\n", - rts_during_tx, rts_during_rx); - /* * RTS signal is handled by HW, it's timing can't be influenced. * However, it's sometimes useful to delay TX even without RTS