public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: loongson2-mmc: drop redundant memset after dma_alloc_coherent()
@ 2026-01-29  3:59 Andre Korol
  2026-01-29  5:04 ` Binbin Zhou
  2026-01-29 15:12 ` Ulf Hansson
  0 siblings, 2 replies; 4+ messages in thread
From: Andre Korol @ 2026-01-29  3:59 UTC (permalink / raw)
  To: ulf.hansson, zhoubinbin; +Cc: linux-mmc, linux-kernel, Andre Korol

dma_alloc_coherent() returns zeroed memory, so the memset() immediately
after allocation is redundant.

Signed-off-by: Andre Korol <andre.korol.dev@gmail.com>
---
 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;
 }
 
-- 
2.51.0


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

end of thread, other threads:[~2026-01-29 18:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-29  3:59 [PATCH] mmc: loongson2-mmc: drop redundant memset after dma_alloc_coherent() Andre Korol
2026-01-29  5:04 ` Binbin Zhou
2026-01-29 15:12 ` Ulf Hansson
2026-01-29 18:10   ` Andre Korol

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox