From: sashiko-bot@kernel.org
To: "Markus Probst" <markus.probst@posteo.de>
Cc: conor+dt@kernel.org, lee@kernel.org, linux-leds@vger.kernel.org,
devicetree@vger.kernel.org, ojeda@kernel.org, robh@kernel.org
Subject: Re: [PATCH v16 2/2] platform: Add initial synology microp driver
Date: Mon, 29 Jun 2026 17:19:29 +0000 [thread overview]
Message-ID: <20260629171930.4ED581F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260629-synology_microp_initial-v16-2-601e91c49e0d@posteo.de>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] StatusLedHandler::brightness_set fails to turn off the LED when brightness is set to 0.
- [Low] The driver depends on a non-existent Kconfig symbol RUST_SERIAL_DEV_BUS_ABSTRACTIONS.
--
commit b10df269f564d88c0451b8cff4f399129c6cc317
Author: Markus Probst <markus.probst@posteo.de>
platform: Add initial synology microp driver
This commit adds an initial Synology Microp driver in Rust. It targets the
microcontroller found in Synology NAS devices to control various LEDs.
> diff --git a/drivers/platform/synology_microp/Kconfig b/drivers/platform/synology_microp/Kconfig
> new file mode 100644
> index 0000000000000..8878cfb7bcddb
> --- /dev/null
> +++ b/drivers/platform/synology_microp/Kconfig
> @@ -0,0 +1,13 @@
> +# SPDX-License-Identifier: GPL-2.0
> +
> +config SYNOLOGY_MICROP
> + tristate "Synology Microp driver"
> + depends on LEDS_CLASS && LEDS_CLASS_MULTICOLOR
> + depends on RUST_SERIAL_DEV_BUS_ABSTRACTIONS
[Severity: Low]
Is RUST_SERIAL_DEV_BUS_ABSTRACTIONS defined anywhere in the kernel tree?
Referencing a non-existent config symbol in "depends on" makes it impossible
to satisfy the dependency, leaving the driver completely unselectable during
configuration.
[ ... ]
> diff --git a/drivers/platform/synology_microp/led.rs b/drivers/platform/synology_microp/led.rs
> new file mode 100644
> index 0000000000000..ce57adfd307f2
> --- /dev/null
> +++ b/drivers/platform/synology_microp/led.rs
[ ... ]
> + fn brightness_set<'bound>(
> + &self,
> + dev: &'bound Self::Bus,
> + classdev: &led::MultiColorDevice<'bound, Self>,
> + brightness: u32,
> + ) -> Result<()> {
> + let mut blink = self.blink.lock();
> + if brightness == 0 {
> + *blink = false;
> + }
> +
> + let amber_brightness = classdev.subleds()[1].brightness();
> +
> + let (color, subled_brightness) = if amber_brightness == 0 {
> + (StatusLedColor::Green, classdev.subleds()[0].brightness())
> + } else {
> + (StatusLedColor::Amber, amber_brightness)
> + };
> +
> + Command::StatusLed(
> + color,
> + if subled_brightness == 0 {
[Severity: Medium]
When brightness is 0, will subled_brightness actually be 0 here?
The LED subsystem does not automatically recalculate the subled brightness
before invoking this callback. If the subled retains its previous non-zero
value, will subled_brightness == 0 evaluate to false, causing the driver to
incorrectly send State::On to the hardware instead of State::Off?
> + State::Off
> + } else if *blink {
> + State::Blink
> + } else {
> + State::On
> + },
> + )
> + .write(dev)
> + }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260629-synology_microp_initial-v16-0-601e91c49e0d@posteo.de?part=2
prev parent reply other threads:[~2026-06-29 17:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-29 16:52 [PATCH v16 0/2] Introduce Synology Microp driver Markus Probst
2026-06-29 16:52 ` [PATCH v16 1/2] dt-bindings: embedded-controller: Add synology microp devices Markus Probst
2026-06-29 17:00 ` sashiko-bot
2026-06-29 16:52 ` [PATCH v16 2/2] platform: Add initial synology microp driver Markus Probst
2026-06-29 17:19 ` sashiko-bot [this message]
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=20260629171930.4ED581F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--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