Re: [PATCH] dmaengine: idxd: No need to clear memory after a dma_alloc_coherent() call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 7/21/23 00:35, sunran001@xxxxxxxxxx wrote:
dma_alloc_coherent() already clear the allocated memory, there is no need
to explicitly call memset().

Signed-off-by: Ran Sun <sunran001@xxxxxxxxxx>

Reviewed-by: Dave Jiang <dave.jiang@xxxxxxxxx>
---
  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;



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux