Re: [PATCH] rust: iommu: replace core::mem::zeroed with pin_init::zeroed
From: Miguel Ojeda
Date: Sun Jun 28 2026 - 06:32:03 EST
On Sat, Jun 27, 2026 at 10:35 AM Alexandre Courbot <acourbot@xxxxxxxxxx> wrote:
>
> Note that you can also use `..Zeroable::zeroed()` here since we are not
> in const context. Not sure which one we prefer in this case, but I'd
> personally err on the side of not referring to `pin_init` unless we are
> dealing with a pinned object or need to because of a const requirement.
That sounds reasonable -- Benno/Gary, any comments?
By the way, speaking of that: the docs of `zeroed()` (both of them)
could mention the existence of the other (and the `const fn`
difference).
I guess this will eventually go through IOMMU, but I can also take it
via `rust-next` if needed.
Thanks!
Cheers,
Miguel