Re: [PATCH v2] rust: of: replace `core::mem::zeroed` with `pin_init::zeroed`
From: Miguel Ojeda
Date: Sun Jan 25 2026 - 14:29:41 EST
On Fri, Oct 31, 2025 at 10:52 AM Moritz Zielke via B4 Relay
<devnull+moritz.zielke.gmail.com@xxxxxxxxxx> wrote:
>
> From: Moritz Zielke <moritz.zielke@xxxxxxxxx>
>
> All types in `bindings` implement `Zeroable` if they can, so use
> `pin_init::zeroed` instead of relying on `unsafe` code.
>
> If this ends up not compiling in the future, something in bindgen or on
> the C side changed and is most likely incorrect.
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1189
> Suggested-by: Benno Lossin <lossin@xxxxxxxxxx>
> Signed-off-by: Moritz Zielke <moritz.zielke@xxxxxxxxx>
These were also sent by Benno, and in the issue he mentions
"re-sending", which usually means just adding your Signed-off-by below
his:
https://lore.kernel.org/all/20250814093046.2071971-1-lossin@xxxxxxxxxx/
But he also mentioned the Suggested-by tag etc., so this is probably OK too.
Cheers,
Miguel