All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH next] sh: remove call to memset after dma_alloc_coherent
@ 2020-01-02  1:54 ` Chen Zhou
  0 siblings, 0 replies; 2+ messages in thread
From: Chen Zhou @ 2020-01-02  1:54 UTC (permalink / raw)
  To: ysato, dalias; +Cc: linux-sh, linux-kernel, chenzhou10

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

Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
---
 arch/sh/mm/consistent.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c
index 3169a34..0de206c 100644
--- a/arch/sh/mm/consistent.c
+++ b/arch/sh/mm/consistent.c
@@ -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;
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH next] sh: remove call to memset after dma_alloc_coherent
@ 2020-01-02  1:54 ` Chen Zhou
  0 siblings, 0 replies; 2+ messages in thread
From: Chen Zhou @ 2020-01-02  1:54 UTC (permalink / raw)
  To: ysato, dalias; +Cc: linux-sh, linux-kernel, chenzhou10

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

Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
---
 arch/sh/mm/consistent.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/sh/mm/consistent.c b/arch/sh/mm/consistent.c
index 3169a34..0de206c 100644
--- a/arch/sh/mm/consistent.c
+++ b/arch/sh/mm/consistent.c
@@ -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;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-02  1:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-02  1:54 [PATCH next] sh: remove call to memset after dma_alloc_coherent Chen Zhou
2020-01-02  1:54 ` Chen Zhou

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.