Re: [GIT PULL] pin-init changes for v7.3-rc1
"Gary Guo" <[email protected]>
| Newsgroups | org.kernel.vger.rust-for-linux,org.kernel.vger.linux-next |
|---|---|
| Message-ID | <[email protected]> |
On Thu Aug 6, 2026 at 6:01 PM BST, Miguel Ojeda wrote: > On Wed, 05 Aug 2026 20:00:07 +0100 Gary Guo <[email protected]> wrote: >> >> Still more of refactors this cycle and not much feature updates. Tuple struct >> still doesn't made it as there are some complexity related to `#[cfg]`s, but >> the cfg-related internal refactoring are picked so hopefully we can land it the >> next one. >> >> I did a late rebase today to rename the API based on Benno's feedback. It does >> made it into today's linux-next (2026-08-05). Feel free to wait for a few more >> rounds before pulling if you see fit. > > Thanks Gary -- we will need this on the merge commit in linux-next due > to the changes from driver-core-next (Cc'ing Mark): > > diff --git a/rust/kernel/serdev.rs b/rust/kernel/serdev.rs > index c0cd24481ee3..a4927452016e 100644 > --- a/rust/kernel/serdev.rs > +++ b/rust/kernel/serdev.rs > @@ -197,7 +197,7 @@ extern "C" fn probe_callback(sdev: *mut bindings::serdev_device) -> kernel::ffi: > // SAFETY: > // - `driver.as_mut_ptr()` is a valid pointer to uninitialized data. > // - `private_data.driver` is pinned. > - let result = unsafe { data.__pinned_init(driver.as_mut_ptr()) }; > + let result = unsafe { pin_init::raw_try_init(driver.as_mut_ptr(), data) }; > > *active = result.is_ok(); > > Cheers, > Miguel Thanks Miguel, the semantic conflict resolution looks correct to me. Best, Gary