From: sunran001@208suo.com
To: vkoul@kernel.org
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] dmaengine: idxd: No need to clear memory after a dma_alloc_coherent() call
Date: Fri, 21 Jul 2023 07:35:46 +0000 [thread overview]
Message-ID: <0bd20a5f09b3419e1d4d8c2b6786e886@208suo.com> (raw)
In-Reply-To: <20230721073440.5402-1-xujianghui@cdjrlc.com>
dma_alloc_coherent() already clear the allocated memory, there is no
need
to explicitly call memset().
Signed-off-by: Ran Sun <sunran001@208suo.com>
---
drivers/dma/idxd/device.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
index 7c74bc60f582..72330876d40a 100644
--- a/drivers/dma/idxd/device.c
+++ b/drivers/dma/idxd/device.c
@@ -792,7 +792,6 @@ static int idxd_device_evl_setup(struct idxd_device
*idxd)
evl->log_size = size;
evl->bmap = bmap;
- memset(&evlcfg, 0, sizeof(evlcfg));
evlcfg.bits[0] = dma_addr & GENMASK(63, 12);
evlcfg.size = evl->size;
next parent reply other threads:[~2023-07-21 7:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230721073440.5402-1-xujianghui@cdjrlc.com>
2023-07-21 7:35 ` sunran001 [this message]
2023-07-21 16:13 ` [PATCH] dmaengine: idxd: No need to clear memory after a dma_alloc_coherent() call Dave Jiang
2023-08-01 18:31 ` Vinod Koul
2023-05-28 14:11 Christophe JAILLET
2023-05-30 15:36 ` Dave Jiang
2023-05-30 15:51 ` Fenghua Yu
2023-05-30 15:54 ` Bernd Petrovitsch
2023-05-30 18:46 ` Christophe JAILLET
2023-07-11 16:44 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0bd20a5f09b3419e1d4d8c2b6786e886@208suo.com \
--to=sunran001@208suo.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox