Skip to contentSkip to conversation

sh: remove call to memset after dma_alloc_coherent

PATCH New Chen Zhou 1 participant 1 message Jan 2, 2020 SuperH

lore
Share & tools
lore

Chen Zhou

author
#0 lore raw

PATCH 1/1 sh: remove call to memset after dma_alloc_coherent

Function dma_alloc_coherent use in buf already zeroes out memory, so memset is not needed.

---
 arch/sh/mm/consistent.c | 2 --
 1 file changed, 2 deletions(-)
arch/sh/mm/consistent.c +0 -2
index 3169a34..0de206c 100644
@@ -57,8 +57,6 @@ int __init platform_resource_setup_memory(struct platform_device *pdev,
 		return -ENOMEM;
 	}
 
-	memset(buf, 0, memsize);
-
 	r->flags = IORESOURCE_MEM;
 	r->start = dma_handle;
 	r->end = r->start + memsize - 1;
Signature · 1 line
2.7.4