From patchwork Mon Mar 13 21:52:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 13173372 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 13030C6FD19 for ; Mon, 13 Mar 2023 21:53:50 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=66i224oJGpGMHoPkXV7ytaqHAPisqRDgplWOSbuuacY=; b=CGMn8BhsnHyrSA 7JR7k9FS6O7RIh5g4urefVDFE4fBFP1/6MoEsY0zLMMfPPaMV7dAqak9sThEETt6fn302F+0qO/sg e+LkWa8xENMuA8O6F8LZxjOcN/7/c81+9wD6DFNpA+gB4XsiEuRX+AaJukSlwJGx2BfZfUQbKzPkf 4ZYt1Qq1F5SUPcmxuREGUK4Z64HPAmVpbUX9YzaalBvUFoNHBveVVGsFDn5ey3Uh/g+J+CxIXDyC6 qbBQ2t9/EZj/JwYf95uNiU6HrW0daLF0BWge3hrKNCW13uD+uQDb8cur9XyhPPAhD1NneYulepxfA NfVWp8mlKgUZz4n3oUVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbq6A-0080DU-35; Mon, 13 Mar 2023 21:52:54 +0000 Received: from smtp-14.smtpout.orange.fr ([80.12.242.14] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pbq66-0080BL-DH for linux-arm-kernel@lists.infradead.org; Mon, 13 Mar 2023 21:52:52 +0000 Received: from localhost.localdomain ([185.117.37.92]) by smtp.orange.fr with ESMTPA id bq5ppwjxtFvkEbq5pp0ucl; Mon, 13 Mar 2023 22:52:37 +0100 X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 13 Mar 2023 22:52:37 +0100 X-ME-IP: 185.117.37.92 From: Christophe JAILLET To: vkoul@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET Subject: [PATCH] dmaengine: imx-dma: Remove a redundant memset() call Date: Mon, 13 Mar 2023 22:52:31 +0100 Message-Id: <95a81d623bffde2e5d14e22fad7e8c9a9a7203f6.1678743528.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230313_145250_628020_181D854E X-CRM114-Status: UNSURE ( 9.51 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The desc->desc structure is already zeroed when 'desc' is kzalloc()'ed. There is no need to clear it twice. Remove the redundant memset(). Signed-off-by: Christophe JAILLET --- drivers/dma/imx-dma.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c index 3bffe3ecbd1b..ee864128334a 100644 --- a/drivers/dma/imx-dma.c +++ b/drivers/dma/imx-dma.c @@ -750,7 +750,6 @@ static int imxdma_alloc_chan_resources(struct dma_chan *chan) desc = kzalloc(sizeof(*desc), GFP_KERNEL); if (!desc) break; - memset(&desc->desc, 0, sizeof(struct dma_async_tx_descriptor)); dma_async_tx_descriptor_init(&desc->desc, chan); desc->desc.tx_submit = imxdma_tx_submit; /* txd.flags will be overwritten in prep funcs */