From patchwork Tue Feb 22 01:14:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 546140 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 39245C433EF for ; Tue, 22 Feb 2022 01:15:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238080AbiBVBQE (ORCPT ); Mon, 21 Feb 2022 20:16:04 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237108AbiBVBQC (ORCPT ); Mon, 21 Feb 2022 20:16:02 -0500 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03C4524F3C; Mon, 21 Feb 2022 17:15:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1645492510; bh=iSIbiqQY+am1M73zZEjjrGJSzNxevmnnhXm36hRIfqw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=AeyV7Qm6vKSfQKXhoeUcb75P59CSBGm947hqdfZBUF3+8x0Dk9TccuMYRoRHWaaJJ 8Y2IBs/tws3+mtRJRolcpLDMt8YG/+CHXDbhDg4kd5ppeY95IlK9efawH85QjnYP+j GkW7mpqWW7Z7xEU2ZMfLs2Ddi6SzTXRUJNOGDEtE= 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 1MF3DW-1nSrDS1nUu-00FV8u; Tue, 22 Feb 2022 02:15:10 +0100 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 v3 6/9] serial: max310: remove redundant memset in rs485_config Date: Tue, 22 Feb 2022 02:14:30 +0100 Message-Id: <20220222011433.8761-7-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:wKGwZ92bvJ8eZUe5xx6uvTWNLasLSuFKw+u6quzZxtU7poVTk55 j5s9fonP6abJ9aj5k/Sjxn3klkZB8Js5Q0q+3sm8bNDETNs+k5npnVX2gd2LISm9IaWbw6G sLf1UEY4o+wPHOY5D7hkdejw6Ls8wPRst3CS1nOE/zl/1BRfFsi5+zXEU/RMvac4OlA/+b7 rUiTgtWlLCkFRpRlfwGWw== X-UI-Out-Filterresults: notjunk:1;V03:K0:lhyAliQH69Q=:2hUiu6M3Dm94AHqmQ4FPRp ahirSDrA+IJixDhwZQiB0t+u99J1K/k82eQ1OSlPa4jUi8JIvroXaHdVknRxGCmRPP+Ze1X+h QjAfY9vGn+0XjiKMEBlrdO+M8y3UmmiCwkZfabIApB+2u1Ff6i2VgN4PTiDE5aQbT+bsBdgsS +QNf3kvPnPUnHAW7ec8EYxVW32yZp7Jrp8yh1eZoa5wMsVn8HnEoBV02s0diIcfoRGbl0nRZx xpdWGuJzF++IGWPHz29WqEP3VJtUMp5653u76OTxLpzmum6YpuieANHIlOnLtavQeJJDC52aB b1s1v1rm2Fv/Vxvtd7PhHCwt1e03dO1DaUBUL+PIgCTlRS9RB14mZBVq+libkgrdbgtTKMzuw m/aRkORAAv2JOk1zlNqi+QAZdvTHI7/KCaQmNtpllP6HI1lCwsm2O6ZBSUtsJQ5FWaDXtxN+8 BFESbX/RnLyazLIQRRCf6CMhLu0/2ajsapGBvDAYupXIlE7LYvEBo3o6aBb/Xo0ADIg8tgWo0 ReYgPJe/6ib8zbx0CKeWGlqsMy2Jf2Ih3/BqRpLm80E8DaMi7Dgi9+uo7GDToK0OQ++nrmZM6 XZYFu8No3ZnnDR3dpOUju1sAOaZCnn+Tu73AqvuBJmiabSpbrO2k7T5RLIgpLR0aEKt5oRC4i 4emJzgVs8lLyZJY/LjWMHraZTcTS4pZww7jBl1DLOXtlN+mxWeEJ0x0deyH8SAY+ZjLkl4rEP Rw4WAWMy77+qUoWDb79xurw9oqOVP8rEWD4/9NCIzpZ//Jk8EFFaFFW0IbEHQwdv+ezvg+X5x jc4kPLuuMSpd/E94wd3e8FdRTErdjtaunV70arGJKx6j3zzlKU0Mre2J6voR70Zd8Ab/OwSDi xPbwH3KGf+FwQUL14+NIoK/GSkOg9FB0CFOwV+2S5cUpe7uRuO6ZJdFMMmk7ED/RaX2xHcsIY BGioZ4n3t9x8jSUTGR1AWMhv3nKFVUdhwhQMFYt9xWnIP+BhnPcbH0rYCzx77QRNpqxO9fznm 9sUGlz7WzjYqlXmLqE9hggrVqHlNU65er/5l5YV3poCd86/TpB8i6qd3EPGbkGmRqMqW00FAs YuewyqJeGHl0tk= 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 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);