Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] The `ConfigSpace` struct silently lost its auto-derived `Send` and `Sync` implementations due to the introduction of a raw pointer (`*mut T`), breaking concurrent and async usage. --
commit be5814bc2aca3acaf94cbcc863fd786a8ccdd291 Author: Gary Guo <[email protected]> rust: pci: io: make ConfigSpace a view This commit splits I/O types into owned objects and views to support I/O projection. It updates ConfigSpace to be a generic view that represents a subregion by encoding the offset and size directly via pointers. > diff --git a/rust/kernel/pci/io.rs b/rust/kernel/pci/io.rs > index e0acb62f58a23..a4cfa1ec6e62f 100644 > --- a/rust/kernel/pci/io.rs > +++ b/rust/kernel/pci/io.rs [ ... ] > -pub struct ConfigSpace<'a, S: ?Sized + ConfigSpaceKind = Extended> { > +pub struct ConfigSpace<'a, T: ?Sized = Extended> { > pub(crate) pdev: &'a Device<device::Bound>, > - _marker: PhantomData<S>, > + ptr: *mut T, > +} [Severity: High] Does the introduction of the raw pointer ptr: *mut T silently drop the Send and Sync auto-trait implementations for ConfigSpace? Previously, with PhantomData, ConfigSpace safely inherited Send and Sync from its Device reference. Because raw pointers do not implement these traits, ConfigSpace might now be restricted to single-threaded use. This could prevent it from being passed to workqueues or held across await points in async driver code. Are explicit unsafe impl Send and unsafe impl Sync blocks needed here to restore concurrent usage capabilities? -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=8
