Re: [PATCH v2] rust: iommu: replace core::mem::zeroed with Zeroable::zeroed

From: Alexandre Courbot

Date: Mon Jun 29 2026 - 21:16:53 EST


On Tue Jun 30, 2026 at 5:10 AM JST, Nicolás Antinori wrote:
> All types in `bindings` implement `Zeroable` if they can. This enables
> using `Zeroable::zeroed` for `io_pgtable_cfg` initialization instead
> of relying on `..unsafe { core::mem::zeroed() }`.
>
> This change improves readability and removes an unnecessary unsafe
> block.
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1189
> Suggested-by: Benno Lossin <lossin@xxxxxxxxxx>
> Signed-off-by: Nicolás Antinori <nico.antinori.7@xxxxxxxxx>

Reviewed-by: Alexandre Courbot <acourbot@xxxxxxxxxx>