From: sashiko-bot@kernel.org
To: "Xianwei Zhao" <xianwei.zhao@amlogic.com>
Cc: devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org,
robh@kernel.org, conor+dt@kernel.org, neil.armstrong@linaro.org
Subject: Re: [PATCH v5 2/3] pwm: meson: add the PWM count driver data
Date: Mon, 30 Nov 2026 12:06:44 +0000 [thread overview]
Message-ID: <sashiko-outbox-241019@kernel.org> (raw)
In-Reply-To: <20261130-s6-s7-pwm-v5-2-396935d2987d@amlogic.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] pwm: meson: unreplaced XYZ placeholder and incomplete commit
message
- [Low] pwm: meson: unaddressed v4 feedback on MESON_NUM_PWMS and XYZ
placeholder
--
commit dc63cdb88cc6bfabf5cc70eb8f664cded9a113d3
Author: Xianwei Zhao <xianwei.zhao@amlogic.com>
> pwm: meson: add the PWM count driver data
>
> To prepare adding support for XYZ which doesn't have 2 but 1
> PWM outputs, make the various loops iterater using chip->npwm
> instead of the constant MESON_NUM_PWMS.
>
> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
> Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
[Severity: Low]
The commit message still contains the literal placeholder "XYZ" instead of
naming the target Amlogic SoCs (S6, S7 and S7D) and has a typo in
"iterater". It also omits that this patch adds npwm to struct
meson_pwm_data, sets .npwm = 2 for existing variants, and passes
pdata->npwm to devm_pwmchip_alloc() in meson_pwm_probe().
> diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
> index 3a28c853089f8..422aa8bb20b44 100644
> --- a/drivers/pwm/pwm-meson.c
> +++ b/drivers/pwm/pwm-meson.c
> @@ -108,6 +108,7 @@ struct meson_pwm_data {
> int (*channels_init)(struct pwm_chip *chip);
> bool has_constant;
> bool has_polarity;
> + u8 npwm;
> };
>
> struct meson_pwm {
> @@ -440,7 +441,7 @@ static int meson_pwm_init_clocks_meson8b(struct pwm_chip *chip,
> char name[255];
> int err;
>
> - for (i = 0; i < MESON_NUM_PWMS; i++) {
> + for (i = 0; i < chip->npwm; i++) {
[ ... ]
> @@ -699,9 +710,10 @@ static int meson_pwm_probe(struct platform_device *pdev)
> {
> struct pwm_chip *chip;
> struct meson_pwm *meson;
> + const struct meson_pwm_data *pdata = of_device_get_match_data(&pdev->dev);
> int err;
>
> - chip = devm_pwmchip_alloc(&pdev->dev, MESON_NUM_PWMS, sizeof(*meson));
> + chip = devm_pwmchip_alloc(&pdev->dev, pdata->npwm, sizeof(*meson));
[Severity: Low]
As reported by Uwe Kleine-König on v4 [1], can MESON_NUM_PWMS be dropped in
this commit now that the channel count comes from pdata->npwm?
drivers/pwm/pwm-meson.c still defines MESON_NUM_PWMS to size
meson_pwm_per_channel_data[] and meson->channels[].
[1] https://lore.kernel.org/r/aw01OAIy4gGjXvDI@monoceros
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261130-s6-s7-pwm-v5-0-396935d2987d@amlogic.com?part=2
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
WARNING: multiple messages have this Message-ID (diff)
From: sashiko-bot@kernel.org
To: "Xianwei Zhao" <xianwei.zhao@amlogic.com>
Cc: devicetree@vger.kernel.org, linux-amlogic@lists.infradead.org,
robh@kernel.org, conor+dt@kernel.org, neil.armstrong@linaro.org
Subject: Re: [PATCH v5 2/3] pwm: meson: add the PWM count driver data
Date: Mon, 30 Nov 2026 12:06:44 +0000 [thread overview]
Message-ID: <sashiko-outbox-241019@kernel.org> (raw)
In-Reply-To: <20261130-s6-s7-pwm-v5-2-396935d2987d@amlogic.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] pwm: meson: unreplaced XYZ placeholder and incomplete commit
message
- [Low] pwm: meson: unaddressed v4 feedback on MESON_NUM_PWMS and XYZ
placeholder
--
commit dc63cdb88cc6bfabf5cc70eb8f664cded9a113d3
Author: Xianwei Zhao <xianwei.zhao@amlogic.com>
> pwm: meson: add the PWM count driver data
>
> To prepare adding support for XYZ which doesn't have 2 but 1
> PWM outputs, make the various loops iterater using chip->npwm
> instead of the constant MESON_NUM_PWMS.
>
> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
> Signed-off-by: Xianwei Zhao <xianwei.zhao@amlogic.com>
[Severity: Low]
The commit message still contains the literal placeholder "XYZ" instead of
naming the target Amlogic SoCs (S6, S7 and S7D) and has a typo in
"iterater". It also omits that this patch adds npwm to struct
meson_pwm_data, sets .npwm = 2 for existing variants, and passes
pdata->npwm to devm_pwmchip_alloc() in meson_pwm_probe().
> diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c
> index 3a28c853089f8..422aa8bb20b44 100644
> --- a/drivers/pwm/pwm-meson.c
> +++ b/drivers/pwm/pwm-meson.c
> @@ -108,6 +108,7 @@ struct meson_pwm_data {
> int (*channels_init)(struct pwm_chip *chip);
> bool has_constant;
> bool has_polarity;
> + u8 npwm;
> };
>
> struct meson_pwm {
> @@ -440,7 +441,7 @@ static int meson_pwm_init_clocks_meson8b(struct pwm_chip *chip,
> char name[255];
> int err;
>
> - for (i = 0; i < MESON_NUM_PWMS; i++) {
> + for (i = 0; i < chip->npwm; i++) {
[ ... ]
> @@ -699,9 +710,10 @@ static int meson_pwm_probe(struct platform_device *pdev)
> {
> struct pwm_chip *chip;
> struct meson_pwm *meson;
> + const struct meson_pwm_data *pdata = of_device_get_match_data(&pdev->dev);
> int err;
>
> - chip = devm_pwmchip_alloc(&pdev->dev, MESON_NUM_PWMS, sizeof(*meson));
> + chip = devm_pwmchip_alloc(&pdev->dev, pdata->npwm, sizeof(*meson));
[Severity: Low]
As reported by Uwe Kleine-König on v4 [1], can MESON_NUM_PWMS be dropped in
this commit now that the channel count comes from pdata->npwm?
drivers/pwm/pwm-meson.c still defines MESON_NUM_PWMS to size
meson_pwm_per_channel_data[] and meson->channels[].
[1] https://lore.kernel.org/r/aw01OAIy4gGjXvDI@monoceros
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261130-s6-s7-pwm-v5-0-396935d2987d@amlogic.com?part=2
next prev parent reply other threads:[~2026-11-30 12:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 11:59 [PATCH v5 0/3] Add PWM support Amlogic S7 S7D S6 Xianwei Zhao via B4 Relay
2026-11-30 11:59 ` Xianwei Zhao
2026-11-30 11:59 ` Xianwei Zhao via B4 Relay
2026-11-30 11:59 ` [PATCH v5 1/3] dt-bindings: pwm: amlogic: Add new bindings for S6 S7 S7D Xianwei Zhao via B4 Relay
2026-11-30 11:59 ` Xianwei Zhao
2026-11-30 11:59 ` Xianwei Zhao via B4 Relay
2026-11-30 12:03 ` sashiko-bot
2026-11-30 12:03 ` sashiko-bot
2026-11-30 11:59 ` [PATCH v5 2/3] pwm: meson: add the PWM count driver data Xianwei Zhao via B4 Relay
2026-11-30 11:59 ` Xianwei Zhao
2026-11-30 11:59 ` Xianwei Zhao via B4 Relay
2026-11-30 12:06 ` sashiko-bot [this message]
2026-11-30 12:06 ` sashiko-bot
2026-11-30 13:42 ` Uwe Kleine-König
2026-11-30 13:42 ` Uwe Kleine-König
2026-11-30 13:45 ` Uwe Kleine-König
2026-11-30 13:45 ` Uwe Kleine-König
2026-12-01 3:07 ` Xianwei Zhao
2026-12-01 3:07 ` Xianwei Zhao
2026-12-01 3:15 ` Xianwei Zhao
2026-12-01 3:15 ` Xianwei Zhao
2026-11-30 11:59 ` [PATCH v5 3/3] pwm: meson: Add support for Amlogic S7 Xianwei Zhao via B4 Relay
2026-11-30 11:59 ` Xianwei Zhao
2026-11-30 11:59 ` Xianwei Zhao via B4 Relay
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-241019@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=xianwei.zhao@amlogic.com \
/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.