From: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
To: RAGUENES Jean Noel <jean-noel.raguenes2@cs-soprasteria.com>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>
Cc: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpiolib: Check gc->get_direction() before calling gpiod_get_direction()
Date: Fri, 31 Jul 2026 10:32:53 +0200 [thread overview]
Message-ID: <178548677168.77960.15544843581885268419.b4-ty@oss.qualcomm.com> (raw)
In-Reply-To: <ad89f92f91d004e63dd5599bb58e9581f373a601.1785318183.git.chleroy@kernel.org>
On Wed, 29 Jul 2026 11:47:20 +0200, Christophe Leroy (CS GROUP) wrote:
> According to 'struct gpio_chip' documentation in linux/gpio/driver.h,
> implementing .get_direction() is recommended but not mandatory.
> Most places verify that gc->get_direction() exists before calling
> gpiod_get_direction(), but gpiolib_dbg_show() doesn't.
>
> Until commit 471e998c0e31 ("gpiolib: remove redundant callback check")
> it was also verified by gpiod_get_direction() itself so calling it at
> all time from gpiolib_dbg_show() was not an issue. But after the check
> in gpiod_get_direction() has been removed, calling it inconditionaly
> leads to a big fat warning in gpiochip_get_direction().
>
> [...]
Applied, thanks!
[1/1] gpiolib: Check gc->get_direction() before calling gpiod_get_direction()
https://git.kernel.org/brgl/c/d761c7e38a000603a9d16270a1af770a0e8efb5e
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
prev parent reply other threads:[~2026-07-31 8:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 9:47 Christophe Leroy (CS GROUP)
2026-07-31 8:32 ` Bartosz Golaszewski [this message]
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=178548677168.77960.15544843581885268419.b4-ty@oss.qualcomm.com \
--to=bartosz.golaszewski@oss.qualcomm.com \
--cc=brgl@kernel.org \
--cc=chleroy@kernel.org \
--cc=jean-noel.raguenes2@cs-soprasteria.com \
--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
all inboxes | Powered by JetHome®