From patchwork Sun Apr 10 10:46:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 559573 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 DB8CEC433F5 for ; Sun, 10 Apr 2022 10:47:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237138AbiDJKuE (ORCPT ); Sun, 10 Apr 2022 06:50:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237207AbiDJKtz (ORCPT ); Sun, 10 Apr 2022 06:49:55 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC46C5371E; Sun, 10 Apr 2022 03:47:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1649587638; bh=MiPI5RKIJn/QCYR3f9zV844luaLp3IqrvICdIRruXKQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=YCE7m4uQyVmiOV393SJYDNtn5tRhOW8LWsWDHZkGI6aFSABKvQWtBAqGu9TrIyowS RcMR8OWpAZfI0V7wYypxgZKdWhfgnMVoZi3HdvUCE/4SnfedgId8adEVL7JwamHH9w 1++Wc15lzFnWbW6JWmM5jVZj6tJEMho2XIiXA4vo= 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 1N1wlv-1o6HHj2DeL-012KMt; Sun, 10 Apr 2022 12:47:18 +0200 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org, u.kleine-koenig@pengutronix.de 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, p.rosenberger@kunbus.com, Lino Sanfilippo Subject: [PATCH v4 RESEND 6/9] serial: max310: remove redundant memset in rs485_config Date: Sun, 10 Apr 2022 12:46:39 +0200 Message-Id: <20220410104642.32195-7-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:r4lBTsfdu2dXPObxKTZw9/+yYZ5MEP6+WV8dRsHu8tb5Ck8lo1t JI3S6XRC0iGI/jRA1w5UE4ixYbc+u31owPilNMVoKAZrd1cwdDbeo/Ct4WoxVCmFln3EHZt Gthf1FPFW2fsK/jglPkgM7dKnNFhYQiffbhPebHZPMgNFQXFMqqbeQUi+2I1cUgos85MvbH T/5uY/4B+rxTDWCrU30lw== X-UI-Out-Filterresults: notjunk:1;V03:K0:INNgmzCAPqQ=:0S4SiF3Xwrb6/shF3UJJBC e3r9atNNylb5GkdA2xMdBPWrHZLUlW9GERV67ADaSshMxbmKJYTAtIbPGdb1ofl2rBXooVmzC sVERsD+5P9fIUOucep86CNF7qbPJTgmEGZFXi4PxKVP+Fa/GIMhsGZLH7m3a4EGIU3okiH9P0 owdHZD6W31a44gBDZnu0yqi9xcosa7l+4sm7p9JoxePrg00vanE+V1j4SQ6z0UJeDvff7VVh8 a9a6pd6OmCYEh2a7UglMX2TKHUxhZb1i/6SL7gIaqiHqgd2MUKR7GRTnvMeRasVxrr5H/OdoG OCacE9b1RPmjIw0VTzcH6F1Qo0WMyZFZ3tJE9aImsfwkZn+qvHhjCMeY9+TDlRn/wIVvgAl98 dO7wihaA6yt/KsTNDJmzXKTmbpYzRhWL7gZeQ2v2HLxHMRvB9Hdx7Gfa2bvsdJ75T0d2mmD36 0G6e/qlmjlGqac4PKftp/+SSnBpVEBfhdeBx+l78xPKPWjO2K3RPsPgUY7w1xOkXLobXuIq7o 8jNlAjBDNffBzinjfRiwkLjYDynP6wSxJOF4JMzxGQmlo9sG21kyskeJ3WSFUnGyaiNoxvhte WKrc7PuKrvjTtRJXznUVkK+XAAtHQimJqT6zIMx4uc9iX41P5bPg3SOLO8qO8JXfb+QHP/GIl g7H5mae6M2kJau3wkj/gtePlq3ZkBmfxaoleY+0WF6y3bd7Sm05Iuuolls4f3O68tdGQMkpQu EYogtAOsOXjIXPwfc4xSbLuY8iemvuj9AOYvZElDIZotHbJ3n9s98Hidzfgk+Pe4kDu+iH/pJ wN8V3Gcrxr2byqAz8SgTZU1VP06C5F6ZVjakZ/anlJZGMKMHMOPETuB2hL7v32+v490KQnmzi GWLpxU1XOYkZP+ic0ZhMuqlNs94IABW66fO8GYDxir8bw3pnWq4CJVlt4eNCyyePby8rcpZHY qxsX9mzqGWMuFDBlR4mNr1EWXciDJNblmHkuO5m/MUgtX3mXmZTwxTfOgx5GNiPO2x07W2etY TCeqk3oCqOA4QKsaGjFrZlMcgn60FWcYHWzTX3QH+cj512yM+gLor1l7dJaYPrd0Wd21XfSNW VUJOclbCzVCgN8= Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org In uart_set_rs485_config() the serial core already nullifies the padding field of the passed serial_rs485 struct before returning it to userspace. Doing the same in the drivers rs485_config() function is redundant, so remove the concerning memset 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 3112b4a05448..a0b6ea52d133 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);