public inbox for linux-gpio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] gpiolib: fix trace on missing gpiochip->get_direction callback
@ 2026-04-09 13:27 Frank Wunderlich
  2026-04-09 14:23 ` Bartosz Golaszewski
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Wunderlich @ 2026-04-09 13:27 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Frank Wunderlich, linux-gpio, linux-kernel, Daniel Golle

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-09 20:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-09 13:27 [PATCH v1] gpiolib: fix trace on missing gpiochip->get_direction callback Frank Wunderlich
2026-04-09 14:23 ` Bartosz Golaszewski
2026-04-09 20:42   ` Aw: " Frank Wunderlich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox