From: sashiko-bot@kernel.org
To: "Joseph Telaak" <joseph@telaak.dev>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 2/2] gpio: Add Siflower GPIO controller driver
Date: Wed, 04 Nov 2026 07:38:16 +0000 [thread overview]
Message-ID: <sashiko-outbox-196803@kernel.org> (raw)
In-Reply-To: <20261104-sf19a2890-gpio-v1-2-45e463c48728@telaak.dev>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] gpio: siflower: Kconfig depends on undefined MACH_SIFLOWER_MIPS
- [Low] gpio: siflower: sf_gpio_probe() open-codes deasserted reset helper
--
commit 22b6fa5e482223ae6c4b545f3ef7b8a0b9775f11
Author: Qingfang Deng <qingfang.deng@siflower.com.cn>
gpio: Add Siflower GPIO controller driver
This commit adds a GPIO and interrupt controller driver for Siflower MIPS
and RISC-V SoCs, including SF19A2890, SF21A6826, and SF21H8898.
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index 55e4280029d86..6125a8452a5bf 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -721,6 +721,17 @@ config GPIO_SIFIVE
> help
> Say yes here to support the GPIO device on SiFive SoCs.
>
> +config GPIO_SIFLOWER
> + tristate "Siflower GPIO support"
> + depends on OF_GPIO
> + depends on MACH_SIFLOWER_MIPS || COMPILE_TEST
[Severity: Medium]
Can CONFIG_GPIO_SIFLOWER be enabled without CONFIG_COMPILE_TEST?
MACH_SIFLOWER_MIPS is not defined anywhere in the kernel tree, so this
dependency always evaluates to n unless COMPILE_TEST is set, and causes
scripts/checkkconfigsymbols.py to report an undefined Kconfig symbol.
Additionally, the commit description, Kconfig help text, and driver header
state that this controller is also used on Siflower RISC-V SoCs, which would
be excluded by a MIPS-only machine dependency, and the driver only uses
generic device property and platform APIs rather than OF_GPIO internals.
> diff --git a/drivers/gpio/gpio-siflower.c b/drivers/gpio/gpio-siflower.c
> new file mode 100644
> index 0000000000000..6eb560da7ffd5
> --- /dev/null
> +++ b/drivers/gpio/gpio-siflower.c
[ ... ]
> +static void sf_gpio_reset_assert(void *data)
> +{
> + reset_control_assert(data);
> +}
> +
> +static int sf_gpio_probe(struct platform_device *pdev)
> +{
[ ... ]
> + priv->rstc = devm_reset_control_get_optional(&pdev->dev, NULL);
> + if (IS_ERR(priv->rstc))
> + return PTR_ERR(priv->rstc);
> +
> + ret = reset_control_deassert(priv->rstc);
> + if (ret)
> + return ret;
> +
> + ret = devm_add_action_or_reset(dev, sf_gpio_reset_assert, priv->rstc);
> + if (ret)
> + return ret;
[Severity: Low]
This isn't a bug, but could sf_gpio_probe() use
devm_reset_control_get_optional_exclusive_deasserted() (or
devm_reset_control_get_exclusive_deasserted(), since resets is required in
the devicetree binding) instead of open-coding the deassertion and custom
sf_gpio_reset_assert() devres action on top of the deprecated
devm_reset_control_get_optional() wrapper? That would also allow dropping
rstc from struct sf_gpio_priv.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261104-sf19a2890-gpio-v1-0-45e463c48728@telaak.dev?part=2
next prev parent reply other threads:[~2026-11-04 7:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 7:21 [PATCH 0/2] gpio: Add the Siflower SF19A2890 GPIO controller Joseph Telaak
2026-11-04 7:21 ` Joseph Telaak via B4 Relay
2026-11-04 7:21 ` [PATCH 1/2] dt-bindings: gpio: Add " Joseph Telaak
2026-11-04 7:21 ` Joseph Telaak via B4 Relay
2026-11-04 8:12 ` Bartosz Golaszewski
2026-11-04 8:32 ` Joseph Telaak
2026-11-04 23:46 ` Conor Dooley
2026-11-05 0:42 ` Joseph Telaak
2026-11-04 7:21 ` [PATCH 2/2] gpio: Add Siflower GPIO controller driver Joseph Telaak
2026-11-04 7:21 ` Joseph Telaak via B4 Relay
2026-11-04 7:38 ` sashiko-bot [this message]
2026-11-04 8:16 ` Bartosz Golaszewski
2026-11-04 8:38 ` Joseph Telaak
2026-11-04 9:12 ` Philipp Zabel
2026-11-04 20:16 ` Joseph Telaak
2026-11-05 9:31 ` Linus Walleij
2026-11-05 20:36 ` Joseph Telaak
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-196803@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=joseph@telaak.dev \
--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.