From: sashiko-bot@kernel.org
To: "Markus Probst" <markus.probst@posteo.de>
Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org, lee@kernel.org,
ojeda@kernel.org, gary@garyguo.net
Subject: Re: [PATCH v2 3/4] rust: io: Implement Copy for RegisterArrayLoc
Date: Fri, 04 Dec 2026 12:33:54 +0000 [thread overview]
Message-ID: <sashiko-outbox-249803@kernel.org> (raw)
In-Reply-To: <20261204-synology_disk_leds-v2-3-12815785ff8b@posteo.de>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] rust: io: missing #[inline] on RegisterArrayLoc::clone()
--
commit 0349592296d0ffae8398cc3d95e7f43776ae3bee
Author: Markus Probst <markus.probst@posteo.de>
rust: io: Implement Copy for RegisterArrayLoc
This commit manually implements Copy and Clone for RegisterArrayLoc<T>
without requiring a T: Copy bound.
> diff --git a/rust/kernel/io/register.rs b/rust/kernel/io/register.rs
> index c4f7be770dcb8..6381c52bd397a 100644
> --- a/rust/kernel/io/register.rs
> +++ b/rust/kernel/io/register.rs
> @@ -209,6 +209,14 @@ fn offset(self) -> usize {
> }
> }
>
> +impl<T: RegisterArray> Copy for RegisterArrayLoc<T> {}
> +
> +impl<T: RegisterArray> Clone for RegisterArrayLoc<T> {
> + fn clone(&self) -> Self {
> + *self
> + }
> +}
[Severity: Low]
Should RegisterArrayLoc::clone() be marked #[inline]? Small functions in the
kernel crate are expected to carry #[inline] so they can be inlined across
crate boundaries, matching other manual Clone implementations in kernel::io
such as MmioRaw::clone().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-synology_disk_leds-v2-0-12815785ff8b@posteo.de?part=3
next prev parent reply other threads:[~2026-12-04 12:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 12:21 [PATCH v2 0/4] leds: Add driver for disk leds in synology devices Markus Probst
2026-12-04 12:21 ` [PATCH v2 1/4] dt-bindings: leds: Add synology disk led controller Markus Probst
2026-12-04 12:35 ` sashiko-bot
2026-12-04 12:21 ` [PATCH v2 2/4] rust: io: Add `RegisterArrayLoc::index` Markus Probst
2026-12-04 12:30 ` sashiko-bot
2026-12-04 12:21 ` [PATCH v2 3/4] rust: io: Implement Copy for RegisterArrayLoc Markus Probst
2026-12-04 12:33 ` sashiko-bot [this message]
2026-12-04 13:38 ` Gary Guo
2026-12-04 13:42 ` Markus Probst
2026-12-04 12:22 ` [PATCH v2 4/4] leds: Add driver for disk leds in synology devices Markus Probst
2026-12-04 13:32 ` sashiko-bot
2026-12-04 16:54 ` Markus Probst
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-249803@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gary@garyguo.net \
--cc=lee@kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=markus.probst@posteo.de \
--cc=ojeda@kernel.org \
--cc=robh@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