From: sashiko-bot@kernel.org
To: "Fenglin Wu" <fenglin.wu@oss.qualcomm.com>
Cc: linux-leds@vger.kernel.org, lee@kernel.org
Subject: Re: [PATCH 3/4] leds: rgb: leds-qcom-lpg: add mutex lock in lpg_pwm_get_state()
Date: Tue, 17 Nov 2026 09:40:46 +0000 [thread overview]
Message-ID: <sashiko-outbox-218501@kernel.org> (raw)
In-Reply-To: <20261117-led-qcom-leds-multiple-fixes-and-pwm-fm-support-v1-3-7a862240683f@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] leds: rgb: leds-qcom-lpg: subject capitalization and commit msg
rationale
--
commit 836798f643edbd8121d300d8532e2745d0e06b99
Author: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
> leds: rgb: leds-qcom-lpg: add mutex lock in lpg_pwm_get_state()
>
> Guard mutex lock at the top of lpg_pwm_get_state(), to make the
> register read atomic against the register write in lpg_pwm_apply().
>
> Fixes: 24e2d05d1b68 ("leds: Add driver for Qualcomm LPG")
> Signed-off-by: Fenglin Wu <fenglin.wu@oss.qualcomm.com>
[Severity: Low]
Is the commit message accurate about what lpg->lock serializes against in
mainline?
Since 1cc2e1faafb3 ("pwm: Add more locking"), the PWM core serializes
chip->ops->apply() and chip->ops->get_state() under chip->nonatomic_lock
in pwm_apply_might_sleep() and pwm_get_state_hw(), so lpg_pwm_get_state()
and lpg_pwm_apply() cannot run concurrently. Taking lpg->lock in
lpg_pwm_get_state() still serializes pwm_dbg_show() -> pwm_get_state_hw()
against LED callbacks such as lpg_brightness_single_set(),
lpg_brightness_mc_set() and lpg_blink_set(), which program channel
registers via lpg_apply() under lpg->lock without holding
chip->nonatomic_lock (in addition to fixing the race with lpg_pwm_apply()
on stable kernels prior to 1cc2e1faafb3 ("pwm: Add more locking")).
Also, per LED subsystem convention, the subject description after the
driver prefix should be capitalized ("leds: rgb: leds-qcom-lpg: Add mutex
lock in lpg_pwm_get_state()").
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261117-led-qcom-leds-multiple-fixes-and-pwm-fm-support-v1-0-7a862240683f@oss.qualcomm.com?part=3
next prev parent reply other threads:[~2026-11-17 9:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 9:31 [PATCH 0/4] leds: leds-qcom-lpg: Add several fixes and the PWM frequency mode support Fenglin Wu
2026-11-17 9:31 ` [PATCH 1/4] leds: rgb: leds-qcom-lpg: Fix single-entry LUT leak Fenglin Wu
2026-11-17 9:46 ` sashiko-bot
2026-11-17 9:31 ` [PATCH 2/4] leds: rgb: leds-qcom-lpg: Fix LED color balancing in HW pattern mode Fenglin Wu
2026-11-17 9:50 ` sashiko-bot
2026-11-17 9:31 ` [PATCH 3/4] leds: rgb: leds-qcom-lpg: add mutex lock in lpg_pwm_get_state() Fenglin Wu
2026-11-17 9:40 ` sashiko-bot [this message]
2026-11-17 9:31 ` [PATCH 4/4] leds: rgb: leds-qcom-lpg: Add PWM frequency mode support Fenglin Wu
2026-11-17 9:51 ` 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=sashiko-outbox-218501@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=fenglin.wu@oss.qualcomm.com \
--cc=lee@kernel.org \
--cc=linux-leds@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.