Re: [PATCH v2] gpu: nova-core: parse structs via zerocopy

"Alexandre Courbot" <[email protected]>
Newsgroups dev.linux.lists.nova-gpu,dev.linux.lists.linux-kernel-mentees,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
On Mon Jun 29, 2026 at 11:20 PM JST, Nicolás Antinori wrote:
> Replace the unsafe `kernel::transmute::FromBytes` trait implementation
> for the `FalconUCodeDescV3`, `PcirStruct`, `BitHeader`, `BitToken`,
> `NpdeStruct`, `PciRomHeader`, `PmuLookupTableEntry` and
> `PmuLookupTableHeader` structs with the derivable `zerocopy::FromBytes`
> trait.
>
> This change eliminates the manual unsafe implementations in favor of a
> derivable trait. When this trait is derived, validity checks are
> performed at compile time to ensure that the type can safely implement
> `FromBytes`.
>
> Link: https://github.com/Rust-for-Linux/linux/issues/1241
> Suggested-by: Miguel Ojeda <[email protected]>
> Signed-off-by: Nicolás Antinori <[email protected]>

Pushed to `drm-rust-next`, thanks!

  [acourbot: add `vbios:` prefix to commit title.]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.