On Thu, Sep 24, 2026 at 2:27 AM Deborah Brouwer <[email protected]> wrote: > > On Wed, Sep 23, 2026 at 09:42:23AM +0200, Alice Ryhl wrote: > > On Wed, Sep 23, 2026 at 1:16 AM Deborah Brouwer > > <[email protected]> wrote: > > > > > > If a new field is added to the struct drm_panthor_gpu_info in the panthor > > > uapi, Tyr must initialize this field or it will cause a compile error. > > > > > > To pre-emptively avoid compile errors, use ..pin_init::zeroed() to zero > > > out all new fields added to this struct. Tyr can subsequently change the > > > initialization as necessary. Also use it instead of manually zeroing out > > > existing fields at the end of the struct. > > > > > > Signed-off-by: Deborah Brouwer <[email protected]> > > > > Merged into drm-rust-next, thanks! > > > > With regards to sashiko bot, we should look into whether the > > MaybeZeroable that bindgen adds to structs applies on this struct. If > > so, we can remove our unsafe impl block. But it's not an issue in this > > patch. > > I couldn't use MaybeZeroable directly but if I add IntoBytes and > Immutable then we can stop implementing unsafe trait AsBytes. Could you > please review: > > https://lore.kernel.org/rust-for-linux/[email protected]/
Oh, yeah, MaybeZeroable isn't the one we want. We'd want MaybeAsBytes, but I'm not sure that exists yet. I think we asked for it, but not sure the state. Alice
