Re: [PATCH v2] rust: iommu: replace core::mem::zeroed with Zeroable::zeroed
Alice Ryhl <[email protected]> Thu, 2 Jul 2026 11:06:21 +0000
| Newsgroups | dev.linux.lists.linux-kernel-mentees,dev.linux.lists.iommu,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jun 29, 2026 at 05:10:41PM -0300, 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 <[email protected]>
> Signed-off-by: Nicolás Antinori <[email protected]>
Reviewed-by: Alice Ryhl <[email protected]>
Joerg, is this cleanup you can pick up? Thanks!