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: 542477 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 18D1EC433EF for ; Sun, 13 Feb 2022 22:33:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238676AbiBMWeD (ORCPT ); Sun, 13 Feb 2022 17:34:03 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238641AbiBMWd5 (ORCPT ); Sun, 13 Feb 2022 17:33:57 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AAFF546B7; Sun, 13 Feb 2022 14:33:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1644791629; bh=e4EzhSBd05ZEK5ajCopJGbJXFDfnsrEfcW+jvd6E+EY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=YxwTNWkLhFD03TT5KQxsIOnM0JLeOn4PRCCayDr7YnHyEZlDRAJpwIbswgGQTasW3 qofz2TAe1ncgIlMRz5EWMvvsA7TNoDjjAQ8zeUlqSBLPFPNWGZCCx1f6nKeD0+7r0h bt4cwdEJx+CZfEwGMXEv1ypOYkQcUyStCXePIHWg= 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 Cc: linux@armlinux.org.uk, richard.genoud@gmail.com, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, ludovic.desroches@microchip.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, lukas@wunner.de, Lino Sanfilippo 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/gBg3u2f9jFJ6mj2wZ/7+fxaGmahcpW28UDocXGZCRFeRNrbCQ 4yjiBCc3/e+QF/Ah5zyTA== X-UI-Out-Filterresults: notjunk:1;V03:K0:/8qhBW/HGNs=:3NOa0RH3JyLBfCAaVitQ78 srakgitfNsLlkOTwdZvSIhlA6qBJVExc2i6J+HJTQXSZ00+R6hBHLgIEjZ3b3JOGXLw7yIyDP z/dLWf6XMf9Xy/tgVwJWH0r43OamjCRnCY5s6gsUkOtQdZnE2EF/xuQEDTU8K8KH/63sb7bHg VvE8gPftT0XqE3wU6rI7lRWclM932FYJ+xVWpCDSQ+pFBJDLk/Fx4T62MTf7CwfPWLbTgQE3b 8ycmQrzmHg3mvjWvQWOttwgJAI5FcdhF5VsOuDVxH2zaSE0DR056l8nKOEyfdaNW5V8qc55Vu +ZK3o4hNFCDti/nzXkX+aqh0XdAN1lanUK3rxGQAW9gscjYtSxbECIeYLNmht+k/ZDKMPWVxy jSDelmDv9Th6qVDrel4ZPV/Pu23oVd8Do1zTCehvJ2u+Z5Wv1wclXMIArEsm1A4aRchCvARZt Z2gOUxgGpXNyvgG+pjdEPI00MglHymbGWo/rdqAsKKItAYxUVeamYdgyPHPziR4DbUrIkjano kYMLqaYGnUcXmR1dNjfgRfLSv/WZzRU7D+diTdq6CYXfE0C4janJIiDJrarfqeswheioi2t5X VTPGvXRr51Sn6sP2MN76T09MuSeOlQauVqXw/AZkM58zB58i5nLnrkcgtFGZCWOTRzsR6BOv0 AJyXSCVrBGbNYhNuyppLETMfdhNkAIGKpYeJk7TpOHs1xksm3d8d0tpAo83/DkWnGAem2xoZa 53P6IVk6fq1pP+lS5wKSufHCmKDOoVLUQ8+UKCa7upjhuXnKYuPHeeCQrUncBEDPgVnMXv11U VoO3EBYBAfdD0yOK7e0zD8smvGHbd4rUvDMcgrWtQAdXCWuCAV7Zs1A56cYy5gpoBAk2CHD6M n+qIwuVE9GaSuosY5gK1CakukvSIgeXzKh/jf8y3sfaVanXy9ydXhvb18MNzw0Lci9x2nmlDR 2OSmNZSiuZLpXr8nMZcQ/HNgWYKXqqUJKEBYv/ugC8s7C/oceyK2nlV/lDN+LPHstugZZe0I1 Oqyl0UUYvuFanmA3mcrnAKCCjKY49OsjH/QMoRcQDQLWi5sZphn7s5qA4P0yhCLjPSHHoyFsC HM/vL9J+qwIFjU= Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.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