mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "André Draszik" <andre.draszik@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
	Tudor Ambarus	 <tudor.ambarus@linaro.org>,
	Peter Griffin <peter.griffin@linaro.org>,
	Will McVicker <willmcvicker@google.com>,
	kernel-team@android.com, linux-gpio@vger.kernel.org,
		linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpiolib: devres: release GPIOs in devm_gpiod_put_array()
Date: Tue, 15 Jul 2025 17:39:02 +0100	[thread overview]
Message-ID: <1b62c265aee13fb250aee653c1b1b627e977917f.camel@linaro.org> (raw)
In-Reply-To: <20250715-gpiolib-devres-put-array-fix-v1-1-970d82a8c887@linaro.org>

On Tue, 2025-07-15 at 17:00 +0100, André Draszik wrote:
> devm_gpiod_put_array() is meant to undo the effects of
> devm_gpiod_get_array() - in particular, it should release the GPIOs
> contained in the array acquired with the latter. It is meant to be the
> resource-managed version of gpiod_put_array(), and it should behave
> similar to the non-array version devm_gpiod_put().
> 
> Since commit d1d52c6622a6 ("gpiolib: devres: Finish the conversion to
> use devm_add_action()") it doesn't do that anymore, it just removes the
> devres action and frees associated memory, but it doesn't actually
> release the GPIOs.
> 
> Fix by switching from devm_remove_action() to devm_release_action(),
> which will in addition invoke the action to release the GPIOs.
> 
> Fixes: d1d52c6622a6 ("gpiolib: devres: Finish the conversion to use devm_add_action()")

The culprit only exists in 6.16-rc for now, and it shouldn't be
backported to older kernels, hence I didn't add CC: stable, hoping
the patch can make it into the 6.16 release

Please let me know if that is unlikely and I shall send a v2 with
Cc: stable instead.

Cheers,
Andre'

  reply	other threads:[~2025-07-15 16:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15 16:00 André Draszik
2025-07-15 16:39 ` André Draszik [this message]
2025-07-16  9:09 ` Bartosz Golaszewski
2025-07-16  9:30   ` Andy Shevchenko

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=1b62c265aee13fb250aee653c1b1b627e977917f.camel@linaro.org \
    --to=andre.draszik@linaro.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bartosz.golaszewski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-team@android.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.griffin@linaro.org \
    --cc=tudor.ambarus@linaro.org \
    --cc=willmcvicker@google.com \
    /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®