From: sashiko-bot@kernel.org
To: "Alexander Kurz" <akurz@blala.de>
Cc: linux-leds@vger.kernel.org, lee@kernel.org
Subject: Re: [PATCH v2 1/2] leds: leds-mc13783: use unified device property API
Date: Sun, 22 Nov 2026 07:42:40 +0000 [thread overview]
Message-ID: <sashiko-outbox-227792@kernel.org> (raw)
In-Reply-To: <20261122073235.26707-2-akurz@blala.de>
Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] leds: mc13783: incomplete conversion to unified device
property API
- [Low] leds: mc13783: commit subject does not follow LED subsystem
format
--
commit 93c8124da2ab3f4f36f3615c125e08a2dcba2624
Author: Alexander Kurz <akurz@blala.de>
leds: leds-mc13783: use unified device property API
This commit replaces OF-specific API calls in mc13xxx_led_probe_dt() with
unified device property helpers from linux/property.h.
> leds: leds-mc13783: use unified device property API
[Severity: Low]
This isn't a bug, but the LED subsystem convention for commit subjects is
"leds: <driver>: <Capitalized description>", so this should be
"leds: mc13783: Use unified device property API".
> diff --git a/drivers/leds/leds-mc13783.c b/drivers/leds/leds-mc13783.c
> index 19c1b51475db6..82b2062b2280d 100644
> --- a/drivers/leds/leds-mc13783.c
> +++ b/drivers/leds/leds-mc13783.c
> @@ -16,8 +16,8 @@
> #include <linux/module.h>
> #include <linux/kernel.h>
> #include <linux/platform_device.h>
> +#include <linux/property.h>
> #include <linux/leds.h>
> -#include <linux/of.h>
> #include <linux/mfd/mc13xxx.h>
>
> struct mc13xxx_led_devtype {
> @@ -114,7 +114,7 @@ static struct mc13xxx_leds_platform_data __init *mc13xxx_led_probe_dt(
> {
> struct mc13xxx_leds *leds = platform_get_drvdata(pdev);
> struct mc13xxx_leds_platform_data *pdata;
> - struct device_node *child;
> + struct fwnode_handle *child;
> struct device *dev = &pdev->dev;
> int i = 0, ret = -ENODATA;
>
> @@ -122,34 +122,34 @@ static struct mc13xxx_leds_platform_data __init *mc13xxx_led_probe_dt(
> if (!pdata)
> return ERR_PTR(-ENOMEM);
>
> - struct device_node *parent __free(device_node) =
> - of_get_child_by_name(dev_of_node(dev->parent), "leds");
> + struct fwnode_handle *parent __free(fwnode_handle) =
> + device_get_named_child_node(dev->parent, "leds");
> if (!parent)
> return ERR_PTR(-ENODATA);
[Severity: Medium]
Should the CONFIG_OF guard around mc13xxx_led_probe_dt() be dropped and
mc13xxx_led_probe() check dev_fwnode(dev->parent) instead of
dev_of_node(dev->parent)?
drivers/leds/leds-mc13783.c:mc13xxx_led_probe() {
...
if (dev_of_node(dev->parent)) {
pdata = mc13xxx_led_probe_dt(pdev);
if (IS_ERR(pdata))
return PTR_ERR(pdata);
} else if (!pdata)
return -ENODATA;
...
}
Leaving mc13xxx_led_probe_dt() behind #ifdef CONFIG_OF and gating it on
dev_of_node(dev->parent) keeps a dependency on an OF helper after
linux/of.h was removed and causes mc13xxx_led_probe() to fail with
-ENODATA for non-OF fwnodes or when CONFIG_OF is disabled.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261122073235.26707-1-akurz@blala.de?part=1
next prev parent reply other threads:[~2026-11-22 7:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 7:32 [PATCH v2 0/2] modernize and fix mc13xxx-led driver Alexander Kurz
2026-11-22 7:32 ` [PATCH v2 1/2] leds: leds-mc13783: use unified device property API Alexander Kurz
2026-11-22 7:42 ` sashiko-bot [this message]
2026-11-22 7:32 ` [PATCH v2 2/2] leds: leds-mc13783: enable driver for deferred probe Alexander Kurz
2026-11-22 7:42 ` [PATCH v2 0/2] modernize and fix mc13xxx-led driver 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-227792@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=akurz@blala.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox