[PATCH] media: mediatek: vcodec: use = { } instead of memset()

Qianfeng Rong rongqianfeng at vivo.com
Sat Aug 30 01:25:15 PDT 2025


在 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




More information about the Linux-mediatek mailing list