mmc: loongson2-mmc: drop redundant memset after dma_alloc_coherent()
PATCH 1/1 mmc: loongson2-mmc: drop redundant memset after dma_alloc_coherent()
dma_alloc_coherent() returns zeroed memory, so the memset() immediately after allocation is redundant.
Signed-off-by Andre Korol <[email protected]>
--- drivers/mmc/host/loongson2-mmc.c | 1 - 1 file changed, 1 deletion(-)
drivers/mmc/host/loongson2-mmc.c +0 -1
@@ -846,7 +846,6 @@ static int ls2k2000_mmc_set_internal_dma(struct loongson2_mmc_host *host,if (!host->sg_cpu)return -ENOMEM ; -memset (host->sg_cpu,0 ,PAGE_SIZE );return 0 ; }
Signature · 1 line
2.51.0
Quoted 4 lines · Andre Korol
dma_alloc_coherent()returns zeroed memory, so thememset()immediately after allocation is redundant.Signed-off-by Andre Korol <[email protected]>
LGTM.
Reviewed-by Binbin Zhou <[email protected]>
Quoted 16 lines
--- drivers/mmc/host/loongson2-mmc.c | 1 - 1 file changed, 1 deletion(-)drivers/mmc/host/loongson2-mmc.c +0
-1@@ -846,7 +846,6 @@ static int ls2k2000_mmc_set_internal_dma(struct loongson2_mmc_host *host,if (!host->sg_cpu)return -ENOMEM ; -memset (host->sg_cpu,0 ,PAGE_SIZE );return 0 ; }
Quoted 5 lines · Andre Korol
dma_alloc_coherent()returns zeroed memory, so thememset()immediately after allocation is redundant.Signed-off-by Andre Korol <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 19 lines
--- drivers/mmc/host/loongson2-mmc.c | 1 - 1 file changed, 1 deletion(-)drivers/mmc/host/loongson2-mmc.c +0
-2@@ -846,7 +846,6 @@ static int ls2k2000_mmc_set_internal_dma(struct loongson2_mmc_host *host,if (!host->sg_cpu)return -ENOMEM ; -memset (host->sg_cpu,0 ,PAGE_SIZE );return 0 ; } --2.51.0
Thanks! Appreciate the quick review.
Andre