[<prev] [next>] [day] [month] [year] [list]
Message-Id: <95a81d623bffde2e5d14e22fad7e8c9a9a7203f6.1678743528.git.christophe.jaillet@wanadoo.fr>
Date: Mon, 13 Mar 2023 22:52:31 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: vkoul@...nel.org, shawnguo@...nel.org, s.hauer@...gutronix.de,
kernel@...gutronix.de, festevam@...il.com, linux-imx@....com
Cc: dmaengine@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: [PATCH] dmaengine: imx-dma: Remove a redundant memset() call
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 <christophe.jaillet@...adoo.fr>
---
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 */
--
2.32.0
Powered by blists - more mailing lists