From patchwork Sun Apr 10 10:46:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 12808120 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 67C05C433F5 for ; Sun, 10 Apr 2022 10:49:36 +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=gx4Hw9fT3g6Hya1klrSg8t8s9oap/zpKLylBkllOyUU=; b=osTQQFZ64RxXCG L3e3QoXsCflGJ6yY1pefyheILgjKKsAetx2EsMDQymcm2deRs4pibxtpDbatDsnWc+lEo9/I2EnUt 9M4nYMyzrsrcilfkusY84uUambd5gju98ok/0j+mmsC44VB1lA2uaMiGodbavqZcQGOypl9MZ9pKv vHlHVL/hG0GUVIA3B3FxsrgWNZ9x24yKsNTDwNJcztm0UH/tX6JoYc6lh/24eouoeaV+usVIhgb0e TWsD/aO8gLYW/NKiWUvbG9BBDeAfnCw+Yi5JFN1RChoCubaNRxUgF30HphV9mv1oImBd7yEL0Eqhh qYKYqIBpDHhnMDzyjYDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndV7K-004g5H-Qs; Sun, 10 Apr 2022 10:48:27 +0000 Received: from mout.gmx.net ([212.227.15.15]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ndV6S-004foy-JC for linux-arm-kernel@lists.infradead.org; Sun, 10 Apr 2022 10:47:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1649587637; bh=sH4GWcet3t8UsheqwmzweMT86DhSlYFlIJ8afvdMkbA=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=LTrw3NSD5pR1mT2xtl5BD/JvFX1Q0D1uUHVI1pnqVEhYG5cZc4WG+eQLlfn5x/kJQ hJjUzTDy8Q7aE/zJ2Nkgh+CqrohMChOJc5sxsAIP0uYVbWZlyET6T42SJCxrgC4y02 P2CsiCgGy+2xHDR4ShO84kkvdZmyfANiQsPBli6c= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([46.223.3.230]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M9Wys-1naBAv16nc-005WBa; Sun, 10 Apr 2022 12:47:17 +0200 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org, u.kleine-koenig@pengutronix.de Subject: [PATCH v4 RESEND 4/9] serial: sc16is7xx: remove redundant check in rs485_config Date: Sun, 10 Apr 2022 12:46:37 +0200 Message-Id: <20220410104642.32195-5-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220410104642.32195-1-LinoSanfilippo@gmx.de> References: <20220410104642.32195-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:nxIRW4IpASBzZhIC0wKy6myh05IHHt/dHYiioie/NX+/0nfaj9T uNtygXATATV0Qm9fZYh+gE5u5cdUbX57WBaeO5gq7rJfCU1v1tkuvdI8iuVOivsWtIUjTJ1 OINg7Ky7tb3wwvZsYxKm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3JoTkEN 10zBMbuKZzv1YJwTgCGP2O/axAVeuGBZ7AjP/hBschgqwNfiIZp/CGjrl0B2chSx1t2KCL+KQ S3ZSq+htgRL8CrXdx9rtN4uxLw33o48fDe1BxhoOLuEiIJZnJ84XFnochqijKQH+0660qSlFw 7hCUneFyc0ttig= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220410_034733_036160_3CD438C4 X-CRM114-Status: GOOD ( 10.10 ) 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 e857fb61efbf..bb939d2877db 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -1134,16 +1134,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