Linux LED subsystem development
 help / color / mirror / Atom feed
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 2/4] rust: io: Add `RegisterArrayLoc::index`
Date: Fri, 04 Dec 2026 12:30:55 +0000	[thread overview]
Message-ID: <sashiko-outbox-249796@kernel.org> (raw)
In-Reply-To: <20261204-synology_disk_leds-v2-2-12815785ff8b@posteo.de>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] rust: io: missing #[inline] attribute on
  RegisterArrayLoc::index()
- [Low] rust: io: commit message lacks motivation for
  RegisterArrayLoc::index()
--

commit 24b30809d05fdd14bb53e8158bd023ab029e6ae1
Author: Markus Probst <markus.probst@posteo.de>

> rust: io: Add `RegisterArrayLoc::index`
>
> Add function to access index of `RegisterArrayLoc`.
>
> Signed-off-by: Markus Probst <markus.probst@posteo.de>

[Severity: Low]
Could the commit message briefly explain why RegisterArrayLoc::index() is
being added?  Right now the body only restates the subject, and since this
introduces a new public method with no callers in this patch, some context
on the intended use case would help reviewers.

> diff --git a/rust/kernel/io/register.rs b/rust/kernel/io/register.rs
> index b6513fa0f412c..c4f7be770dcb8 100644
> --- a/rust/kernel/io/register.rs
> +++ b/rust/kernel/io/register.rs
> @@ -192,6 +192,11 @@ pub fn try_new(idx: usize) -> Option<Self> {
>              None
>          }
>      }
> +
> +    /// Returns the array position.
> +    pub const fn index(self) -> usize {
> +        self.0
> +    }
>  }

[Severity: Low]
Should RegisterArrayLoc::index() be marked #[inline]?  Small functions in
kernel abstractions are expected to carry #[inline], matching sibling
accessors like OffsetLoc::const_offset() in the same file.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-synology_disk_leds-v2-0-12815785ff8b@posteo.de?part=2

  reply	other threads:[~2026-12-04 12:30 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 [this message]
2026-12-04 12:21 ` [PATCH v2 3/4] rust: io: Implement Copy for RegisterArrayLoc Markus Probst
2026-12-04 12:33   ` sashiko-bot
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-249796@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