You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've moved ARef<T> and AlwaysRefCounted from types.rs to sync/aref.rs as suggested. However, several modules across the kernel tree currently import these types from crate::types.
Would you prefer that I:
Re-export them from types.rs to maintain compatibility, or
Update all call sites to import directly from sync::aref?
Let me know which approach you'd prefer for this patch. Thanks!
If there are not too many, it may be possible to do it at once early in a kernel cycle. In general, we may need a transition period, i.e. we do one kernel cycle with all existing instances moved, and then early the next kernel cycle we remove the re-export at the same time that we move any new ones that appeared during the last one.
(Side-note: for bigger ones in the future, we may want to leverage Clippy).
If there are not too many, it may be possible to do it at once early in a kernel cycle. In general, we may need a transition period, i.e. we do one kernel cycle with all existing instances moved, and then early the next kernel cycle we remove the re-export at the same time that we move any new ones that appeared during the last one.
(Side-note: for bigger ones in the future, we may want to leverage Clippy).
I can see around 29 references. Possibly I'll re-export them from types.rs to aref.rs in this patch and in the next patch, i'll update the call sites to import from sync::aref?
Activity
Shankari02 commentedon Jun 22, 2025
Hello,
I would be interested to work on this issue. Will send a patch to the mailing-list according to the specified instructions.
Shankari02 commentedon Jun 23, 2025
Hello @BennoLossin,
I've moved
ARef<T>andAlwaysRefCountedfromtypes.rstosync/aref.rsas suggested. However, several modules across the kernel tree currently import these types fromcrate::types.Would you prefer that I:
Re-export them from
types.rsto maintain compatibility, orUpdate all call sites to import directly from
sync::aref?Let me know which approach you'd prefer for this patch. Thanks!
ojeda commentedon Jun 23, 2025
If there are not too many, it may be possible to do it at once early in a kernel cycle. In general, we may need a transition period, i.e. we do one kernel cycle with all existing instances moved, and then early the next kernel cycle we remove the re-export at the same time that we move any new ones that appeared during the last one.
(Side-note: for bigger ones in the future, we may want to leverage Clippy).
Shankari02 commentedon Jun 23, 2025
I can see around 29 references. Possibly I'll re-export them from
types.rstoaref.rsin this patch and in the next patch, i'll update the call sites to import fromsync::aref?BennoLossin commentedon Jun 23, 2025
splitting the update patch from the moving patch sounds like a good idea.
I don't think that we need to split the two patches over different cycles. As Miguel said, we can just pick it early in the cycle.
Shankari02 commentedon Jun 23, 2025
Sent a patch
rust: move ARef and AlwaysRefCounted to sync::aref
rust: update ARef and AlwaysRefCounted call sites to import from sync…
rust: move ARef and AlwaysRefCounted to sync::aref
rust: update ARef and AlwaysRefCounted call sites to import from sync…
rust: move ARef and AlwaysRefCounted to sync::aref
143 remaining items
rust: device: Update ARef and AlwaysRefCounted imports from sync::aref
rust: scatterlist: Update ARef imports to use sync::aref
samples: rust: debugfs: Update ARef imports to use sync::aref
rust: device: Update ARef and AlwaysRefCounted imports from sync::aref
rust: scatterlist: Update ARef imports to use sync::aref
samples: rust: debugfs: Update ARef imports to use sync::aref
drivers: android: binder: Update ARef imports from sync::aref
drm: nova: update ARef import from sync::aref
rust: i2c: Update ARef and AlwaysRefCounted imports to use sync::aref
rust: usb: Update AlwaysRefCounted imports to use sync::aref
rust: types: remove temporary re-exports of ARef and AlwaysRefCounted
rust: i2c: Update ARef and AlwaysRefCounted imports to use sync::aref
rust: usb: Update AlwaysRefCounted imports to use sync::aref
rust: types: remove temporary re-exports of ARef and AlwaysRefCounted
ojeda commentedon Mar 15, 2026
And now we finally finished the move with the removal of the temporary re-export.