Re: [PATCH] usb: rust: Use pin_init::zeroed for usb_device_id initialization
Greg Kroah-Hartman <[email protected]> Wed, 8 Jul 2026 14:10:35 +0200
| Newsgroups | dev.linux.lists.linux-kernel-mentees,org.kernel.vger.linux-kernel,org.kernel.vger.linux-usb,org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <2026070828-sedan-unisexual-b1d6@gregkh> |
On Sun, Jun 28, 2026 at 12:08:56PM +0200, Miguel Ojeda wrote: > On Fri, Jun 26, 2026 at 12:50 AM Nicolás Antinori > <[email protected]> wrote: > > > > All types in `bindings` implement `Zeroable` if they can. This enables > > using `pin_init::zeroed()` for `usb_device_id` initialization instead > > of relying on `..unsafe { MaybeUninit::zeroed().assume_init() }`. > > > > This change improves readability and removes unnecessary unsafe blocks. > > > > Link: https://github.com/Rust-for-Linux/linux/issues/1189 > > Suggested-by: Benno Lossin <[email protected]> > > Signed-off-by: Nicolás Antinori <[email protected]> > > Looks fine -- if needed I can pick it up via `rust-next`. I'll take it, thanks. greg k-h