Linux PCI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Markus Probst" <markus.probst@posteo.de>
Cc: ojeda@kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH v19 2/3] rust: leds: add Mode trait
Date: Wed, 03 Jun 2026 16:26:15 +0000	[thread overview]
Message-ID: <20260603162615.C664D1F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260603-rust_leds-v19-2-2a71085deae3@posteo.de>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Compilation error due to undeclared module 'private'.
--

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

rust: leds: add Mode trait

This commit adds the led::Mode trait to allow for other types of led class
devices in led::LedOps.

> diff --git a/rust/kernel/led/normal.rs b/rust/kernel/led/normal.rs
> index 08913e94e2f1b..61ea7a9e7f2c3 100644
> --- a/rust/kernel/led/normal.rs
> +++ b/rust/kernel/led/normal.rs
> @@ -6,11 +6,19 @@
>  
>  use super::*;
>  
> +/// The led mode for the `struct led_classdev`. Leds with this mode can only have a fixed color.
> +pub enum Normal {}
> +
> +impl Mode for Normal {
> +    type Device<'bound, T: LedOps<Mode = Self> + 'bound> = Device<'bound, T>;
> +}
> +impl private::Sealed for Normal {}

[Severity: Low]
Will this compile? The glob import use super::*; only brings public items
from the parent module into scope. Since mod private is private to led.rs,
it seems private::Sealed is not in scope here. Should this explicitly
reference the parent module using impl super::private::Sealed for Normal {}?

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260603-rust_leds-v19-0-2a71085deae3@posteo.de?part=2

  reply	other threads:[~2026-06-03 16:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03 15:55 [PATCH v19 0/3] rust: leds: add led classdev abstractions Markus Probst
2026-06-03 15:55 ` [PATCH v19 1/3] rust: leds: add basic " Markus Probst
2026-06-03 16:17   ` sashiko-bot
2026-06-03 15:56 ` [PATCH v19 2/3] rust: leds: add Mode trait Markus Probst
2026-06-03 16:26   ` sashiko-bot [this message]
2026-06-03 15:56 ` [PATCH v19 3/3] rust: leds: add multicolor classdev abstractions Markus Probst
2026-06-03 16:39   ` sashiko-bot

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=20260603162615.C664D1F00893@smtp.kernel.org \
    --to=sashiko-bot@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