Re: [PATCH] rust_binder: use pin_init::zeroed for file_operations initialization
Miguel Ojeda <[email protected]> Sun, 28 Jun 2026 12:16:44 +0200
| Newsgroups | dev.linux.lists.linux-kernel-mentees,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <CANiq72k8KOmVLrHGOa9SidU=vYqGUqi5dmyW9J1auVMnqaQAeg@mail.gmail.com> |
On Fri, Jun 26, 2026 at 11:44 PM Nicolás Antinori <[email protected]> wrote: > > - // SAFETY: All zeroes is safe for the `file_operations` type. > - let zeroed_ops = unsafe { core::mem::MaybeUninit::zeroed().assume_init() }; > + let zeroed_ops = pin_init::zeroed(); I would just remove the variable and put `zeroed()` directly in the fops initializer like we do in other cases, but it is fine of course. I guess it will go through Binder, but if `rust-next` is preferred, please let me know. Thanks! Cheers, Miguel