Re: [PATCH] mmc: loongson2-mmc: drop redundant memset after dma_alloc_coherent()

From: Binbin Zhou

Date: Thu Jan 29 2026 - 00:04:29 EST



On 2026/1/29 11:59, Andre Korol wrote:
dma_alloc_coherent() returns zeroed memory, so the memset() immediately
after allocation is redundant.

Signed-off-by: Andre Korol <andre.korol.dev@xxxxxxxxx>
LGTM.
Reviewed-by: Binbin Zhou <zhoubinbin@xxxxxxxxxxx>
---
drivers/mmc/host/loongson2-mmc.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/mmc/host/loongson2-mmc.c b/drivers/mmc/host/loongson2-mmc.c
index da3daab5f3d6..026cbd80f114 100644
--- a/drivers/mmc/host/loongson2-mmc.c
+++ b/drivers/mmc/host/loongson2-mmc.c
@@ -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;
}