Thank you for your contribution! Sashiko AI review found 1 potential issue(s)
to consider:
- [Low] The import statement `pub use ordering::{Full, Read, Write};` violates
the vertical import style guideline.
--
commit c070c38a2a2dec94e13a6201bf19eb33e82b5478
Author: Gary Guo <[email protected]>
rust: sync: generic memory barriers
This commit implements a generic interface for memory barriers (full system,
DMA, and SMP) that requires the user to specify their intent. It provides
Read, Write, and Full orderings which map to the existing rmb(), wmb(), and
mb() barriers to reduce code duplication.
> diff --git a/rust/kernel/sync/barrier.rs b/rust/kernel/sync/barrier.rs
> index 8f2d435fcd944..54c527fdb7605 100644
> --- a/rust/kernel/sync/barrier.rs
> +++ b/rust/kernel/sync/barrier.rs
[ ... ]
> +pub mod ordering {
> + pub use crate::sync::atomic::ordering::Full;
> +
> + /// The annotation type for read-read barrier ordering.
> + pub struct Read;
> +
> + /// The annotation type for write-write barrier ordering.
> + pub struct Write;
> +}
> +
> +pub use ordering::{Full, Read, Write};
[Severity: Low]
This isn't a bug, but does this violate the kernel's vertical import style
guidelines?
The subsystem documentation states that commits touching imports should follow
the vertical import style, which places each imported item on its own line
when braces are used to group multiple items.
--
Sashiko AI review ยท
https://sashiko.dev/#/patchset/[email protected]?part=2