From: Luo Qiu <luoqiu@kylinsec.com.cn>
To: Nicolas Dufresne <nicolas.dufresne@collabora.com>,
Benjamin Gaignard <benjamin.gaignard@collabora.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] media: verisilicon: Remove unnecessary memset() after dma_alloc_coherent
Date: Wed, 25 Mar 2026 13:00:55 +0800 [thread overview]
Message-ID: <856D681C2A51EC65+20260325050055.1187863-1-luoqiu@kylinsec.com.cn> (raw)
dma_alloc_coherent() already returns zeroed memory, so the subsequent
memset(0) calls are redundant.
Signed-off-by: Luo Qiu <luoqiu@kylinsec.com.cn>
---
drivers/media/platform/verisilicon/hantro_vp9.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/media/platform/verisilicon/hantro_vp9.c b/drivers/media/platform/verisilicon/hantro_vp9.c
index 566cd376c097..607d618e8f4a 100644
--- a/drivers/media/platform/verisilicon/hantro_vp9.c
+++ b/drivers/media/platform/verisilicon/hantro_vp9.c
@@ -187,7 +187,6 @@ int hantro_vp9_dec_init(struct hantro_ctx *ctx)
return -ENOMEM;
tile_edge->size = size;
- memset(tile_edge->cpu, 0, size);
size = hantro_vp9_segment_map_size(max_width, max_height);
vp9_dec->segment_map_size = size;
@@ -198,7 +197,6 @@ int hantro_vp9_dec_init(struct hantro_ctx *ctx)
goto err_segment_map;
segment_map->size = size;
- memset(segment_map->cpu, 0, size);
size = hantro_vp9_prob_tab_size();
vp9_dec->ctx_counters_offset = size;
@@ -211,7 +209,6 @@ int hantro_vp9_dec_init(struct hantro_ctx *ctx)
goto err_misc;
misc->size = size;
- memset(misc->cpu, 0, size);
init_v4l2_vp9_count_tbl(ctx);
--
2.53.0
next reply other threads:[~2026-03-25 5:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 5:00 Luo Qiu [this message]
2026-03-25 13:21 ` [PATCH] media: verisilicon: Remove unnecessary memset() after dma_alloc_coherent Nicolas Dufresne
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=856D681C2A51EC65+20260325050055.1187863-1-luoqiu@kylinsec.com.cn \
--to=luoqiu@kylinsec.com.cn \
--cc=benjamin.gaignard@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=nicolas.dufresne@collabora.com \
--cc=p.zabel@pengutronix.de \
/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