From: sashiko-bot@kernel.org
To: "Markus Probst" <markus.probst@posteo.de>
Cc: linux-leds@vger.kernel.org, linux-pci@vger.kernel.org,
lee@kernel.org, ojeda@kernel.org, gary@garyguo.net
Subject: Re: [PATCH v27 3/4] rust: leds: Add multicolor classdev abstractions
Date: Fri, 16 Oct 2026 18:22:25 +0000 [thread overview]
Message-ID: <sashiko-outbox-174765@kernel.org> (raw)
In-Reply-To: <20261016-rust_leds-v27-3-2c296d8a8e5b@posteo.de>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] rust: missing #[inline] attribute on MultiColorDevice Deref implementation
--
commit 613f67478931d09e9dba3aabd68d89e0638569b4
Author: Markus Probst <markus.probst@posteo.de>
rust: leds: Add multicolor classdev abstractions
This commit adds Rust abstractions for multicolor led class devices. It
introduces the MultiColor led mode, MultiColorSubLed, MultiColorDevice,
and DeviceBuilder::build_multicolor to handle registration and lifecycle
management of multicolor LEDs.
> diff --git a/rust/kernel/led/multicolor.rs b/rust/kernel/led/multicolor.rs
> new file mode 100644
> index 0000000000000..aebc8a24712ab
> --- /dev/null
> +++ b/rust/kernel/led/multicolor.rs
[ ... ]
> +impl<'bound, T: LedOps + 'bound> Deref for MultiColorDevice<'bound, T> {
> + type Target = T;
> +
> + fn deref(&self) -> &Self::Target {
> + &self.ops
> + }
> +}
[Severity: Low]
This isn't a bug, but according to the Rust subsystem guidelines, small
functions in abstractions that merely forward to a field or a C binding
should be annotated with #[inline].
Since the Deref::deref method implementation for MultiColorDevice is a
trivial field access, should this include the #[inline] annotation? Without
it, the optimizer might be hindered from inlining the dereference effectively
across crate boundaries.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261016-rust_leds-v27-0-2c296d8a8e5b@posteo.de?part=3
next prev parent reply other threads:[~2026-10-16 18:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 18:08 [PATCH v27 0/4] rust: leds: Add led classdev abstractions Markus Probst via B4 Relay
2026-10-16 18:08 ` [PATCH v27 1/4] rust: leds: Add basic " Markus Probst via B4 Relay
2026-10-16 18:24 ` sashiko-bot
2026-10-16 18:08 ` [PATCH v27 2/4] rust: leds: Add Mode trait Markus Probst via B4 Relay
2026-10-16 18:13 ` sashiko-bot
2026-10-16 18:08 ` [PATCH v27 3/4] rust: leds: Add multicolor classdev abstractions Markus Probst via B4 Relay
2026-10-16 18:22 ` sashiko-bot [this message]
2026-10-16 18:08 ` [PATCH v27 4/4] MAINTAINERS: rust: leds: Add rust abstraction entry Markus Probst via B4 Relay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-174765@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=gary@garyguo.net \
--cc=lee@kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=markus.probst@posteo.de \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox