Re: [PATCH v2 16/16] rust: io: register: unify handling of register with/without bitfields
[email protected] Wed, 05 Aug 2026 16:51:10 +0000
| Newsgroups | gmane.linux.kernel.pci,gmane.comp.video.dri.devel |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The documentation comment for `FixedIoLoc::Location` references `[`FixedIoLoc::location`]`, which does not exist. -- --- Patch [16]: [PATCH v2 16/16] rust: io: register: unify handling of register with/without bitfields --- commit eee244bc141adb8220a5c6420bc3a94addf8572c Author: Gary Guo <[email protected]> rust: io: register: unify handling of register with/without bitfields This commit unifies the handling of registers with and without bitfields by making the fixed location a property of the type. It replaces FixedRegister with a new FixedIoLoc trait to indicate if a type's I/O location is unique for a specific base. > diff --git a/rust/kernel/io/register.rs b/rust/kernel/io/register.rs > index fe0e6763a600e..80282c423868a 100644 > --- a/rust/kernel/io/register.rs > +++ b/rust/kernel/io/register.rs [ ... ] > @@ -265,6 +224,17 @@ fn try_at(idx: usize) -> Option<RegisterArrayLoc<Self>> > } > } > > +/// Trait implemented by types that indicate there is a fixed I/O location for this given type. > +/// > +/// Implementors can be used with [`Io::write_reg`](super::Io::write_reg). > +pub trait FixedIoLoc<Base: ?Sized>: Sized { > + /// Type of [`FixedIoLoc::location`]. [Severity: Low] This isn't a bug, but does this intra-doc link point to a non-existent item? The trait defines a Location type and a LOCATION constant, but no location method or field, which will likely result in a broken rustdoc link. > + type Location: IoLoc<Base, Self>; > + > + /// Location of this type within given base. > + const LOCATION: Self::Location; > +} -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=16