From patchwork Mon Feb 28 02:39:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 12762327 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 35FDAC433F5 for ; Mon, 28 Feb 2022 02:45:34 +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=MTdCqq35HNPvW1/2epi+Lv07eohvCPprb3Ko1cc7GS0=; b=bamdLsrZ3EBUiv yfCTlyDEcy/zDQq3uUug/p6ULKUBfZomujO1oEDsyMA7pU54e+GopIpqZxknNhNDs3OeR1dnAoRsL aSHYJRu5iocaeG/mFefVN14fLgdxNoCnbgV6KiB7EqjWQ4lM3TiNGU7Yh0w18nkm/q/lJkyQzpEHU VmZm8XNuUIsau801Exjea6i35NuXQk3Y0Qz3MiEXuByzlmV3nlgAdLjk+BzqVuZBCu38JQmAayP3Z Wlr5ortR0ZYlvNCOOZL60pjP9CAhTT1e+W7KT27ZBtkE7pNFuJDBlUfWOPJMM03H8F3D2NqHeYSDs g8yRuJJEW59Qh+OYFflA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOW1C-00Aal6-6M; Mon, 28 Feb 2022 02:44:10 +0000 Received: from mout.gmx.net ([212.227.17.20]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOVxL-00AZE5-LF for linux-arm-kernel@lists.infradead.org; Mon, 28 Feb 2022 02:40:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1646015995; bh=iSIbiqQY+am1M73zZEjjrGJSzNxevmnnhXm36hRIfqw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=f6CP4unmD1KZ6N3RFfl8UvbOK2ln9OziJUJ24F+mj9VZ9nCuIc8mraxGLehVELvKf yklplZE/IoQHmUEMq56NkwrbP+0C6ZhdyAVOdkUlLN7Bo6FFPyCuWr777QIomqSKuQ 6Rz5IoGASlXLfwJ/GyUcW+iZ2/XNOep/ky6pwQrk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([149.172.237.68]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M7sDq-1nKeKX020A-004yWo; Mon, 28 Feb 2022 03:39:55 +0100 From: Lino Sanfilippo To: gregkh@linuxfoundation.org, jirislaby@kernel.org, u.kleine-koenig@pengutronix.de Subject: [PATCH v4 6/9] serial: max310: remove redundant memset in rs485_config Date: Mon, 28 Feb 2022 03:39:25 +0100 Message-Id: <20220228023928.1067-7-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220228023928.1067-1-LinoSanfilippo@gmx.de> References: <20220228023928.1067-1-LinoSanfilippo@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:UyxTOKZGWZ8nWvI2z/fzQ/YFBYocUp7YsypBgL9evAkOXKLDvLG jqIYO6zgCFPAOEYbCgIhAs3A3H7FnznWX/T/BescrY0+tQ3zgaJfbVj0wv+a3jJ7hUhmprd OD6EWw1ppf0YKR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mBp/CxcY4NchZZSd/U R5ud+PnMUobadXESaVlN6VKbdEGFAMlVYvp4ejTpwGPkUuOvDDAMPnJN3lTie/QpfN0RMKPxa 3SssHCffvI+xYJOi6utjrhCMiPEKlRlLAyjq03DRf6WVS00OHS/NQRdXJEIbXuVI2M+P99dtV KWx/tkZ9TZjLXg= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220227_184012_134221_BB09D5AB X-CRM114-Status: UNSURE ( 9.52 ) X-CRM114-Notice: Please train this message. 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 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);