Skip to contentSkip to conversation

dmaengine: idxd: No need to clear memory after a dma_alloc_coherent() call

PATCH In review [email protected] 3 participants 3 messages Jul 21, 2023 – Aug 1, 2023 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 dmaengine: idxd: No need to clear memory after a dma_alloc_coherent() call

dma_alloc_coherent() already clear the allocated memory, there is no need to explicitly call memset().

---
 drivers/dma/idxd/device.c | 1 -
 1 file changed, 1 deletion(-)
drivers/dma/idxd/device.c +0 -1
index 7c74bc60f582..72330876d40a 100644
@@ -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;
reviewer Reviewed-by on v1 1/1
#2 lore raw
Quoted 4 lines · On 7/21/23 00:35, [email protected] wrote:

dma_alloc_coherent() already clear the allocated memory, there is no need to explicitly call memset().

Quoted 16 lines
---
  drivers/dma/idxd/device.c | 1 -
  1 file changed, 1 deletion(-)
drivers/dma/idxd/device.c +0 -1
index 7c74bc60f582..72330876d40a 100644
@@ -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;
maintainer
#3 lore raw
In reply to [email protected]
Quoted 2 lines · On 21-07-23, 07:35, [email protected] wrote:

dma_alloc_coherent() already clear the allocated memory, there is no need to explicitly call memset().

Please fix the sender name and resend. it should match s-o-b name

Quoted 18 lines
---
 drivers/dma/idxd/device.c | 1 -
 1 file changed, 1 deletion(-)
drivers/dma/idxd/device.c +0 -1
index 7c74bc60f582..72330876d40a 100644
@@ -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;
Signature · 1 line
~Vinod