public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Andre Korol <andre.korol.dev@gmail.com>
To: ulf.hansson@linaro.org, zhoubinbin@loongson.cn
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andre Korol <andre.korol.dev@gmail.com>
Subject: [PATCH] mmc: loongson2-mmc: drop redundant memset after dma_alloc_coherent()
Date: Thu, 29 Jan 2026 00:59:17 -0300	[thread overview]
Message-ID: <20260129035917.48080-1-andre.korol.dev@gmail.com> (raw)

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


             reply	other threads:[~2026-01-29  3:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-29  3:59 Andre Korol [this message]
2026-01-29  5:04 ` [PATCH] mmc: loongson2-mmc: drop redundant memset after dma_alloc_coherent() Binbin Zhou
2026-01-29 15:12 ` Ulf Hansson
2026-01-29 18:10   ` Andre Korol

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260129035917.48080-1-andre.korol.dev@gmail.com \
    --to=andre.korol.dev@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=zhoubinbin@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox