[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <174185403526.7115.15257225871449545065.b4-ty@linaro.org>
Date: Thu, 13 Mar 2025 09:20:36 +0100
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Linus Walleij <linus.walleij@...aro.org>,
Genes Lists <lists@...ience.com>,
Bartosz Golaszewski <brgl@...ev.pl>
Cc: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org,
Marek Szyprowski <m.szyprowski@...sung.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH] gpiolib: don't check the retval of get_direction() when registering a chip
From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
On Tue, 11 Mar 2025 18:56:31 +0100, Bartosz Golaszewski wrote:
> During chip registration we should neither check the return value of
> gc->get_direction() nor hold the SRCU lock when calling it. The former
> is because pin controllers may have pins set to alternate functions and
> return errors from their get_direction() callbacks. That's alright - we
> should default to the safe INPUT state and not bail-out. The latter is
> not needed because we haven't registered the chip yet so there's nothing
> to protect against dynamic removal. In fact: we currently hit a lockdep
> splat. Revert to calling the gc->get_direction() callback directly and
> *not* checking its value.
>
> [...]
Applied, thanks!
[1/1] gpiolib: don't check the retval of get_direction() when registering a chip
commit: 0102fbf52b93e609fec0dab53b1fb4fe69113f5e
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Powered by blists - more mailing lists