From: sashiko-bot@kernel.org
To: "Arnd Bergmann" <arnd@kernel.org>
Cc: dmitry.torokhov@gmail.com, linux-input@vger.kernel.org
Subject: Re: [PATCH 01/10] [v2] [net-next] net: dsa: b53: hide legacy gpiolib usage on non-mips
Date: Sat, 30 May 2026 00:45:19 +0000 [thread overview]
Message-ID: <20260530004519.A9BAB1F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260520183815.2510387-2-arnd@kernel.org>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Probe errors from devm_gpio_request_one() are silently ignored, failing to propagate critical errors such as -EPROBE_DEFER.
--
commit 46ca85c6cb9da93cad093c8eb342afc0ea94be33
Author: Arnd Bergmann <arnd@arndb.de>
net: dsa: b53: hide legacy gpiolib usage on non-mips
This commit moves legacy gpiolib usage inside an #ifdef block and transitions
the common parts of the driver to use modern GPIO descriptors. This allows
building the driver even when gpio_set_value is left out of the kernel.
> diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
> index 2c4131ed7e30b..d838511ae6744 100644
> --- a/drivers/net/dsa/b53/b53_common.c
> +++ b/drivers/net/dsa/b53/b53_common.c
[ ... ]
> @@ -3173,12 +3172,6 @@ static int b53_switch_init(struct b53_device *dev)
> return -ENOMEM;
>
> dev->reset_gpio = b53_switch_get_reset_gpio(dev);
> - if (dev->reset_gpio >= 0) {
> - ret = devm_gpio_request_one(dev->dev, dev->reset_gpio,
> - GPIOF_OUT_INIT_HIGH, "robo_reset");
> - if (ret)
> - return ret;
> - }
>
> return 0;
> }
[Severity: High]
Does this silently ignore probe errors like -EPROBE_DEFER?
Previously, if devm_gpio_request_one failed, the error was returned to the
caller. Now, b53_switch_get_reset_gpio handles the request and returns an
ERR_PTR on failure, but that error pointer is simply stored in dev->reset_gpio
while b53_switch_init unconditionally returns 0.
Later in the code, b53_switch_reset_gpio relies on IS_ERR(dev->reset_gpio)
to gracefully return, which would silently skip the reset sequence entirely
if the GPIO controller simply isn't ready yet (-EPROBE_DEFER) or if there
was a memory allocation failure (-ENOMEM).
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260520183815.2510387-1-arnd@kernel.org?part=1
next prev parent reply other threads:[~2026-05-30 0:45 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 18:38 [PATCH v2 00/10] gpiolib: fence off legacy interfaces Arnd Bergmann
2026-05-20 18:38 ` [PATCH 01/10] [v2] [net-next] net: dsa: b53: hide legacy gpiolib usage on non-mips Arnd Bergmann
2026-05-30 0:45 ` sashiko-bot [this message]
2026-05-20 18:38 ` [PATCH 02/10] [v3] input: gpio-keys: make legacy gpiolib optional Arnd Bergmann
2026-05-21 9:03 ` Bartosz Golaszewski
2026-05-22 4:55 ` Matti Vaittinen
2026-05-22 8:28 ` Arnd Bergmann
2026-05-22 12:45 ` Matti Vaittinen
2026-05-25 8:57 ` Linus Walleij
2026-05-29 5:37 ` Dmitry Torokhov
2026-05-30 0:45 ` sashiko-bot
2026-05-20 18:38 ` [PATCH 03/10] [v2] x86/olpc: select GPIOLIB_LEGACY Arnd Bergmann
2026-05-20 18:38 ` [PATCH 04/10] [v2] sh: select legacy gpiolib interface Arnd Bergmann
2026-05-21 6:49 ` John Paul Adrian Glaubitz
2026-05-20 18:38 ` [PATCH 05/10] [v2] mips: select legacy gpiolib interfaces where used Arnd Bergmann
2026-05-30 0:45 ` sashiko-bot
2026-05-20 18:38 ` [PATCH 06/10] [v4] leds: gpio: make legacy gpiolib interface optional Arnd Bergmann
2026-05-20 18:38 ` [PATCH 07/10] [v6 net-next] dt-bindings: net: add st,stlc4560/p54spi binding Arnd Bergmann
2026-05-21 9:04 ` Bartosz Golaszewski
2026-05-20 18:38 ` [PATCH 08/10] [v6 net-next] p54spi: convert to devicetree Arnd Bergmann
2026-05-30 0:45 ` sashiko-bot
2026-05-20 18:38 ` [PATCH 09/10] [v6 omap] ARM: dts: omap2: add stlc4560 spi-wireless node Arnd Bergmann
2026-05-20 21:39 ` Johannes Berg
2026-05-20 21:46 ` Andreas Kemnade
2026-05-20 18:38 ` [PATCH 10/10] gpiolib: turn off legacy interface by default Arnd Bergmann
2026-05-30 0:45 ` 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=20260530004519.A9BAB1F00898@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=arnd@kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@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