]> git.baikalelectronics.ru Git - kernel.git/commitdiff
sh: remove call to memset after dma_alloc_coherent
authorChen Zhou <chenzhou10@huawei.com>
Thu, 2 Jan 2020 01:54:30 +0000 (09:54 +0800)
committerRich Felker <dalias@libc.org>
Sat, 15 Aug 2020 02:05:03 +0000 (22:05 -0400)
Function dma_alloc_coherent use in buf already zeroes out memory,
so memset is not needed.

Signed-off-by: Chen Zhou <chenzhou10@huawei.com>
Signed-off-by: Rich Felker <dalias@libc.org>
arch/sh/mm/consistent.c

index 3169a343a5abe57757267fbe690617c6b9e52da6..0de206c1acfe9fa35706d2694131c61b288731aa 100644 (file)
@@ -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;