From: Frank Wunderlich <linux@fw-web.de>
To: Linus Walleij <linusw@kernel.org>, Bartosz Golaszewski <brgl@kernel.org>
Cc: Frank Wunderlich <frank-w@public-files.de>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Daniel Golle <daniel@makrotopia.org>
Subject: [PATCH v1] gpiolib: fix trace on missing gpiochip->get_direction callback
Date: Thu, 9 Apr 2026 15:27:23 +0200 [thread overview]
Message-ID: <20260409132724.126258-1-linux@fw-web.de> (raw)
From: Frank Wunderlich <frank-w@public-files.de>
if gpio_chip.get_direction callback is not implemented (e.g. pinctrl-moore) there
is a bunch of traces because of this.
Just remove the WARN_ON to avoid traces and restore previous behaviour but keep the
sanitization active.
Fixes: 471e998c0e31 ("gpiolib: remove redundant callback check")
Fixes: e623c4303ed1 ("gpiolib: sanitize the return value of gpio_chip::get_direction()")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
drivers/gpio/gpiolib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 86a171e96b0e..302cbd7989f3 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -420,7 +420,7 @@ static int gpiochip_get_direction(struct gpio_chip *gc, unsigned int offset)
lockdep_assert_held(&gc->gpiodev->srcu);
- if (WARN_ON(!gc->get_direction))
+ if (!gc->get_direction)
return -EOPNOTSUPP;
ret = gc->get_direction(gc, offset);
--
2.43.0
next reply other threads:[~2026-04-09 13:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-09 13:27 Frank Wunderlich [this message]
2026-04-09 14:23 ` [PATCH v1] gpiolib: fix trace on missing gpiochip->get_direction callback Bartosz Golaszewski
2026-04-09 20:42 ` Aw: " Frank Wunderlich
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=20260409132724.126258-1-linux@fw-web.de \
--to=linux@fw-web.de \
--cc=brgl@kernel.org \
--cc=daniel@makrotopia.org \
--cc=frank-w@public-files.de \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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