From patchwork Sun Feb 13 22:27:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 12744715 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 EF0ADC433F5 for ; Sun, 13 Feb 2022 22:32:11 +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=CnbvMahy0QluML0SijsZbnSLAMbEMrts0uLnA9yKtw4=; b=0tamF0kVuE3NoC ep2+dX3V28T3UM3PHCafJ5b842sWWfoto6PEEfjXBc/qaM0QUCtHl1eBRSYSalKcQ4lfKheIyhKwA KqGLqfSE1FUA0tDWuknXagRfc19EPignFSGzmNpRppSE5r0j+Ps4oBY+CneOhrVDfRaajDaGtNnet CMSnEx94HkokmyPRyGu8s4/TEJlRrUSXfpRimlGQJ1rznDdrXl5SvnJNSPYNhzpdRz4OshpgP/i8G SKkCxHP6pmOOa4pVtuCI2/y5omS4bOVZpK7i9qFdGv/VSVfF/RHsmU0RdbkTSv/9OFhR33+N62gr1 JuFPo1Mp62iySolvEXzg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJNO6-00CdVj-Tw; Sun, 13 Feb 2022 22:30:35 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJNMB-00CceD-Do for linux-arm-kernel@bombadil.infradead.org; Sun, 13 Feb 2022 22:28:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=qLYG3ShC2H3ubPzsSwJCdlMrSsl/GQcb1NMteyXFxUQ=; b=l5vPHHpbjNXqgxF1Bmye9jk8+Q jbJCldwDKbkYrOKOJ109zQHtNF4kVIcEHPHetHI0lWDiSsgNXicZe132pOi3RCLypf+pneXgN/SRs 65yZ/atZG9p6ZDSaLDQ+Ep2CCQlx9WFxOuiBKU9VdCh8OYDL+V8FOP4Jgr+7dVetYcjQpEfT5ochA cUtKsuXL0TPwne3Gh1fcXVDbxq6MNo6+lyXUA00OTQwKZFATomXoz9tlrk1CzAumN58Atuzx0mN6h Ga3HYcpsGiuCswQV8MmzqVOYNDWP7ZQWTYGaeoI3n0OP5n1kuevay9v48BZtoEGP5kahTLeiElsDp iOPTKp4A==; Received: from mout.gmx.net ([212.227.17.22]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJNM4-009kpv-Pt for linux-arm-kernel@lists.infradead.org; Sun, 13 Feb 2022 22:28:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1644791289; bh=qLYG3ShC2H3ubPzsSwJCdlMrSsl/GQcb1NMteyXFxUQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=lgP1/MpdcAcPp7WHS54cbOSQHqn1sGQ3HE+4zwm10xwkG3C7wQ8tond7u+hcQ54uN JusZjET/+F0Dw/hYVft7ItRNPQFZyprK4024TqW0p9cCpgO43EOLrVGCaRxMvK+bXU DHo+H3RYpGQC23RkbBntSMjv1S/LHUh8IzWAuXsA= 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 1MHGCu-1nWcsj2aye-00DExV; Sun, 13 Feb 2022 23:28:09 +0100 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org Subject: [PATCH 6/9] serial: max310: remove redundant code in rs485_config Date: Sun, 13 Feb 2022 23:27:34 +0100 Message-Id: <20220213222737.15709-7-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:pNx+oEQyE87SI8SUhuYE/49GQx6eFVSP9sCHmwT/ditRcv0ylZN rkC/z0D7Q2MUrIrRUkpVmA71yNbDTddrfPtrt8KCP/4yOZ2GPb61Nh3ULguiKqL0WQstrUN QGKtvqxZref4S6azX7N1AacR+IVk1yMV8IHdwiZZEUXR+W4Bo/HkFSxPoooN5TYo9XQpjMZ K15CBILg6Irsn1kmnCbgg== X-UI-Out-Filterresults: notjunk:1;V03:K0:2gMVRpGJ+Pg=:zWCMeP+npjT8Y/OgwGxOaG VMCSchLMxUMyAtHOqgp4TAJYxw4V54Y7dRP9R47RZn88AnOXCBib0+YGubMvpcd8wThqHSC/8 Nwg3RxXlciQGdYTwDzyx8nuJs0+/HbiqeMRcc6iVF5BT5djY/lnnfRKlMY2Tqxen3hNNcrzpe hAf/S9kELuCs5w8/zl12hULu07GN/u5aR6jS49nBQ0k0wRd6Q4Rzw9FnolG4+TYpx09Uq+/sN EmxqPxEYSXVSId9vb0wL8msWTg0RPW5c3MDGG/PpyHsluHHRsdsdqaPQOK9jJyN0nIq8sRCFd 8r8SqmskkiM01Amycn22xIo6ZeXMu8BTfcgSI+ixEQ1B5LnYdeeDFbHh1tjhfzUj4jsdpQAmg 5Ojw/hI8b+Nv08Ot1IM++wHBCKaRMfB4y7aajEkh5EetA1ujxusE+YMMMvwabFtv5Yq9DWFp9 PmJ2r+9RCvHsSf5+Wd9QXNdCenDMhv8YQCLR4mrjolo16/BaLEZHVGvJ75vCiS9S50XVYTxWQ kdbWAklmpKik+nXwIOIeXvrLoSnUwq1rnxq1i5XJR3YLdANcT65ngL6ls4PdhF19EyND6a/NN dPyj9Zl0VJR5UFWUcI8WiLXEWvvKmwjkuve1TkCzSIGljdioSA7J1HlLKNKUF/+8Ie6RxzwS9 zEpg6d6V2WFl86pvi7SQitcRPaCq9U0EHUzHr7Ius+yD61O4YQJn3/giZSN5gAeoSqydxWHFJ k5tlDvtOk0BJFuQtYEzQR7rGv53UQZxp5+agsffHOEoBv88OiOb9eQ1bn520pIwr5mnysCJVa GLThz5R3CXjBoNNKRh0Qj+LGF1QzEED8OO7PRFZFOLgIkEO1a7aFHGKyttq5qUNO8kfqgrYbq +mQYoci7vdgPotq87O5yy23/y/53YirGVVURl8+OfGrfurqoV+Xe5+MHBxVrPNBIiIIWvwx1K 6vhzMKZCPdKbtrODQ1jCNQONvgUfe6nE57FtGa8paqjR0xKLsOMdlKPGxkkj78zorK7Yeu6Lr df24JZAl9ZhMZOco6ake+ytEyjjVIPKgS6Hxzie695CjJ+V2ZSOZDw5zekAcMdIcTDsKmbLJc /Kplh30qc0nLcE= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_222829_108190_D0CD51F5 X-CRM114-Status: GOOD ( 10.26 ) 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 nullifies the padding field of the returned configuration struct. Doing the same in the drivers rs485_config function is redundant, so remove the concerning code in this function. Signed-off-by: Lino Sanfilippo --- drivers/tty/serial/max310x.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c index dde0824b2fa5..2ecc5f66deaf 100644 --- a/drivers/tty/serial/max310x.c +++ b/drivers/tty/serial/max310x.c @@ -1037,7 +1037,6 @@ static int max310x_rs485_config(struct uart_port *port, rs485->flags &= SER_RS485_RTS_ON_SEND | SER_RS485_RX_DURING_TX | SER_RS485_ENABLED; - memset(rs485->padding, 0, sizeof(rs485->padding)); port->rs485 = *rs485; schedule_work(&one->rs_work);