Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The infallible `read64` and `write64` methods cause a compilation error on 64-bit architectures when used with standard `Region` types due to a static alignment mismatch. --
commit 0321066113dacd6668c86fd092b4b4ebb3e4e5e0 Author: Gary Guo <[email protected]> rust: io: implement Mmio as view type This commit implements Mmio and RelaxedMmio as view types, and delegates the I/O implementations of MmioOwned to these new views. It also updates the existing users of MmioOwned in the documentation to reflect the new semantics. > diff --git a/rust/kernel/io.rs b/rust/kernel/io.rs > --- a/rust/kernel/io.rs > +++ b/rust/kernel/io.rs [ ... ] > -impl_mmio_io_capable!( > - MmioOwned, > - #[cfg(CONFIG_64BIT)] > - u64, > - readq, > - writeq > -); > +#[cfg(CONFIG_64BIT)] > +impl_mmio_io_capable!(Mmio, u64, readq, writeq); [Severity: Low] Will this cause a compilation error on 64-bit architectures when read64 or write64 are used with standard Region types? Looking at the static assertions for I/O operations (like io_addr_assert or the refactored io_view_assert), u64 requires 8-byte alignment, but Region::MIN_ALIGN is statically set to 4. Does this mean the static assertion checking alignment (comparing Alignment::of against MIN_ALIGN) will unconditionally evaluate to false and abort compilation when drivers attempt to use infallible 64-bit I/O on Region-backed mappings? -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=7
