mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Qianfeng Rong <rongqianfeng@vivo.com>
To: Nicolas Dufresne <nicolas@ndufresne.ca>,
	Tiffany Lin <tiffany.lin@mediatek.com>,
	Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
	Yunfei Dong <yunfei.dong@mediatek.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	Hans Verkuil <hverkuil@kernel.org>,
	Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] media: mediatek: vcodec: use = { } instead of memset()
Date: Sat, 30 Aug 2025 16:25:15 +0800	[thread overview]
Message-ID: <536ceeac-a180-47e1-9664-a047929ec3d7@vivo.com> (raw)
In-Reply-To: <d76038453bfd06ea9d0c90e7583078abc85ce280.camel@ndufresne.ca>


在 2025/8/30 2:49, Nicolas Dufresne 写道:
> Hi,
>
>
> Le dimanche 03 août 2025 à 21:55 +0800, Qianfeng Rong a écrit :
>> Based on testing and recommendations by David Lechner et al. [1][2],
>> using = { } to initialize a structure or array is the preferred way
>> to do this in the kernel.
>>
>> This patch converts memset() to = { }, thereby:
>> - Eliminating the risk of sizeof() mismatches.
>> - Simplifying the code.
> Last month, Irui Wang sent an actual fix [0] for uninitialized data in this
> driver. Your patch seems to be related, yet the previous fix is not covered and
> this is not marked as a V2. Since this refactoring collide with an actual fix
> that I'm waiting for a V2, I'd rather not take it and wait.
>
> Any chances you can respin this with a second patches covering Irui's fix ?


Thanks for taking the time to explain!

If there are conflicts, please ignore my patch for now, as it might
not address the actual issue. After Irui's fix is merged, I can
update my patch if necessary.


Best regards,
Qianfeng


      reply	other threads:[~2025-08-30  8:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-03 13:55 Qianfeng Rong
2025-08-05 13:06 ` Markus Elfring
2025-08-05 13:17   ` Qianfeng Rong
2025-08-05 13:32     ` Markus Elfring
2025-08-29 18:57       ` Nicolas Dufresne
2025-08-30  7:49         ` Qianfeng Rong
2025-08-29 18:49 ` [PATCH] " Nicolas Dufresne
2025-08-30  8:25   ` Qianfeng Rong [this message]

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=536ceeac-a180-47e1-9664-a047929ec3d7@vivo.com \
    --to=rongqianfeng@vivo.com \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=andrzejtp2010@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=hverkuil@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=nicolas@ndufresne.ca \
    --cc=tiffany.lin@mediatek.com \
    --cc=yunfei.dong@mediatek.com \
    /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

all inboxes | Powered by JetHome®