Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Flavio Amieiro" <flavio@amieiro.net>
Cc: linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org, lee@kernel.org
Subject: Re: [PATCH v5 2/2] leds: is31f132xx: Add support for is31fl3206
Date: Sun, 15 Nov 2026 00:23:28 +0000	[thread overview]
Message-ID: <sashiko-outbox-215144@kernel.org> (raw)
In-Reply-To: <20261114-add-is31fl3206-support-v5-2-332db80233df@amieiro.net>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] leds: is31fl32xx: mixed declarations and code in
  is31fl32xx_init_regs()
--

commit 17585c728364ffbaee88a6c09e1a1085eccc5391
Author: Flavio Amieiro <flavio@amieiro.net>

leds: is31f132xx: Add support for is31fl3206

This commit adds support for the ISSI IS31FL3206 LED controller by allowing
the chip definition to specify a bit offset for the enable bits in the LED
control register.

> diff --git a/drivers/leds/leds-is31fl32xx.c b/drivers/leds/leds-is31fl32xx.c
> index 581c05bab9697..1c76b0fb1f159 100644
> --- a/drivers/leds/leds-is31fl32xx.c
> +++ b/drivers/leds/leds-is31fl32xx.c

[ ... ]

> @@ -350,8 +358,10 @@ static int is31fl32xx_init_regs(struct is31fl32xx_priv *priv)
>  	 * We will control state with PWM registers alone.
>  	 */
>  	if (cdef->led_control_register_base != IS31FL32XX_REG_NONE) {
> -		u8 value =
> -		    GENMASK(cdef->enable_bits_per_led_control_register-1, 0);
> +		u8 value = GENMASK(cdef->enable_bits_per_led_control_register-1, 0);
> +
> +		value <<= cdef->enable_bits_offset_in_led_control_reg;
> +
>  		u8 num_regs = cdef->channels /
>  				cdef->enable_bits_per_led_control_register;
>  		int i;

[Severity: Low]
As reported by Lee Jones on v4 [1], placing the shift of value before the
declarations of num_regs and i mixes declarations and statements in
is31fl32xx_init_regs(). Could the shift be moved below the variable
declarations or folded into the initializer?

[1] https://lore.kernel.org/r/179370064610.793788.8239015594326628135@kernel.org

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261114-add-is31fl3206-support-v5-0-332db80233df@amieiro.net?part=2

      reply	other threads:[~2026-11-15  0:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15  0:12 [PATCH v5 0/2] leds: Add support for the is31fl3206 LED driver Flavio Amieiro
2026-11-15  0:12 ` [PATCH v5 1/2] dt-bindings: leds: Add issi,is31fl3206 to leds-is31fl32xx Flavio Amieiro
2026-11-15  0:12 ` [PATCH v5 2/2] leds: is31f132xx: Add support for is31fl3206 Flavio Amieiro
2026-11-15  0:23   ` 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=sashiko-outbox-215144@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=flavio@amieiro.net \
    --cc=lee@kernel.org \
    --cc=linux-leds@vger.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