From patchwork Tue Feb 22 01:14:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 12754392 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 CBA14C433EF for ; Tue, 22 Feb 2022 01:17:47 +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=7Ifj5eE9fw+T38/gLv3CkHWTOYhXb2rzIc2yoTYqiFY=; b=oscZyzeMTc2k1g 3J7L9MwqFQHn9kQXTVkKEq7Uxe6og7v1qZBiTK+0jG04dzVIr1QXVZBiE+J9GjAe5CKzosXSNp1CC XcvUQd0LX71+IN6PzWmRizlm0YzEa24+30TVpZRlhYkDLVQI9em7B1Mn7PY+RKYKfgfq4mYjpPm4o AZQBypU94JFTEZTa46OAhNN1KHOGBzsJiEd8a+5fc4lMs1wWB/LeWSYWki6sZQPxDxWQySOTmCjfF dUE/3bD0A9WVEc6kc8nu1LYabWAOMm2O/h/fbd4BLUhbTkj/2392fy3VbDZJjXNiMECXwz6SFKS7F yy7fs5Gal0+BObESa5RA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMJn0-007aeC-Fg; Tue, 22 Feb 2022 01:16:26 +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 1nMJm5-007aMU-Gb for linux-arm-kernel@lists.infradead.org; Tue, 22 Feb 2022 01:15:32 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1645492509; bh=q9DO7/fg2xOZjFdAWb9ykKHQwvph2xk9kVhhmi9Mufs=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Vcz55CeNnKecxWsY+LSbi5KyAgYWgOUaC+5bzPg02gy6zvnVqvpKeiH5u60J0AOXk PBjuPunYbsTgBiqT0LVTPpOdZ3LWPBvZLg2zeTqIdg89iUX7lVXaK9A8tAibNkNTDJ oUKy8y/xQzO0smKEl2ZsHp2X1IIPlNNLatRLRhjQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([149.172.237.68]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MdefD-1nvvZM0rVh-00ZhnZ; Tue, 22 Feb 2022 02:15:09 +0100 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org, u.kleine-koenig@pengutronix.de Subject: [PATCH v3 4/9] serial: sc16is7xx: remove redundant check in rs485_config Date: Tue, 22 Feb 2022 02:14:28 +0100 Message-Id: <20220222011433.8761-5-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220222011433.8761-1-LinoSanfilippo@gmx.de> References: <20220222011433.8761-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:tIxe3R5aj/xYwDMk5u7jQ2OEUfwHp37Mnn4DCv39EdTF+0G+o5M pLpdSq4pgFPgrfW4xSi751av18e2KtauIOlv7UXbD/fDH1JN/jTwkEzNbs4iOWcvdgwDnwJ RLIhX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kkJtLY0hgRERYt2S3QpL3GIwlrdMRSaff0vTe CvN0mUWtWzS9VtC95tphM9nXhsvv/cFne7y5oI7JKCyk1kZRGyM8iK2ocYlme0A5yDgzg6Z5V EkAXVwtcRoytlbZ/Ww/RDtkAHM55nIaglzmaD5a8KsNtmROG4DUj0YNt0LrJzTWuNol+4IJGY LkJ3VDMGqDk7i0= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220221_171529_881979_983E0658 X-CRM114-Status: GOOD ( 11.20 ) 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, p.rosenberger@kunbus.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In uart_set_rs485_config() the serial core already ensures that only one of both options RTS on send or RTS after send is set. So remove this check from the 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