From: sashiko-bot@kernel.org
To: "Bartosz Golaszewski" <bartosz.golaszewski@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, linux-gpio@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 10/10] gpio: shared: generalize most code to firmware nodes
Date: Fri, 13 Nov 2026 15:57:14 +0000 [thread overview]
Message-ID: <sashiko-outbox-213132@kernel.org> (raw)
In-Reply-To: <20261113-fwnode-for-each-prop-v2-10-4edc23d5cf50@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] gpio: shared: define __free() fwnode in one statement in
scan_property()
--
commit 78d07ba961e7635e708d83665d68a4604d21cd5c
Author: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
gpio: shared: generalize most code to firmware nodes
This commit converts the device-tree scanning code in gpiolib-shared.c to
use generic fwnode APIs and guards the remaining OF-specific entry point
with CONFIG_OF.
> diff --git a/drivers/gpio/gpiolib-shared.c b/drivers/gpio/gpiolib-shared.c
> index 44af3bc1494e4..edd61d16f065f 100644
> --- a/drivers/gpio/gpiolib-shared.c
> +++ b/drivers/gpio/gpiolib-shared.c
[ ... ]
> @@ -131,157 +130,159 @@ static int gpio_shared_setup_reset_proxy(struct gpio_shared_entry *entry,
[ ... ]
> + for (i = 0; i < count; i++) {
> + struct fwnode_handle *fwnode __free(fwnode_handle) = NULL;
> + char *con_id __free(kfree) = NULL;
>
> - ret = of_parse_phandle_with_args(curr, prop->name,
> - "#gpio-cells", i,
> + ret = fwnode_property_get_reference_args(curr, propname,
> + "#gpio-cells", 0, i,
> &args);
> - if (ret)
> - continue;
> + if (ret)
> + continue;
>
> - np = args.np;
> + fwnode = args.fwnode;
[Severity: Low]
This isn't a bug, but fwnode is not used before
fwnode_property_get_reference_args() succeeds, so it can be defined and
initialized in a single statement as:
struct fwnode_handle *fwnode __free(fwnode_handle) = args.fwnode;
rather than being initialized to NULL at the top of the loop body and
assigned later.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261113-fwnode-for-each-prop-v2-0-4edc23d5cf50@oss.qualcomm.com?part=10
next prev parent reply other threads:[~2026-11-13 15:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 15:47 [PATCH v2 00/10] gpio: make gpiolib-shared more fwnode-centric Bartosz Golaszewski
2026-11-13 15:47 ` [PATCH v2 01/10] lib: string_helpers: export and rename struct strarray Bartosz Golaszewski
2026-11-13 16:09 ` Andy Shevchenko
2026-11-13 15:47 ` [PATCH v2 02/10] lib: string_helpers: implement a CLASS() for string arrays Bartosz Golaszewski
2026-11-13 16:09 ` Andy Shevchenko
2026-11-13 15:47 ` [PATCH v2 03/10] fwnode: define the property_get_names() operation Bartosz Golaszewski
2026-11-13 15:47 ` [PATCH v2 04/10] device property: provide fwnode_property_get_names() Bartosz Golaszewski
2026-11-13 16:13 ` Andy Shevchenko
2026-11-13 15:47 ` [PATCH v2 05/10] of: property: implement the .property_get_names() fwnode operation Bartosz Golaszewski
2026-11-13 15:47 ` [PATCH v2 06/10] fwnode: define the count_references() " Bartosz Golaszewski
2026-11-13 15:47 ` [PATCH v2 07/10] device property: provide fwnode_property_count_references() Bartosz Golaszewski
2026-11-13 16:13 ` Andy Shevchenko
2026-11-13 15:47 ` [PATCH v2 08/10] of: property: implement the count_references() fwnode operation Bartosz Golaszewski
2026-11-13 15:47 ` [PATCH v2 09/10] gpio: shared: removed unused field from struct gpio_shared_entry Bartosz Golaszewski
2026-11-13 16:14 ` Andy Shevchenko
2026-11-13 15:47 ` [PATCH v2 10/10] gpio: shared: generalize most code to firmware nodes Bartosz Golaszewski
2026-11-13 15:57 ` sashiko-bot [this message]
2026-11-13 16:19 ` Andy Shevchenko
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-213132@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-gpio@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 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.