Re: (subset) [PATCH v3 0/8] gpiolib: scope-based management and cleanup for GPIO descriptor arrays

From: Bartosz Golaszewski

Date: Tue Nov 17 2026 - 03:25:02 EST



On Thu, 05 Nov 2026 22:30:14 -0800, Dmitry Torokhov wrote:
> This series fixes a GPIO descriptor leak and a fast-path cancellation
> bug in gpiod_get_array(), fixes the !CONFIG_OF_GPIO stub for
> of_gpio_count() to return -ENOENT instead of 0, introduces
> DEFINE_FREE() scope-based cleanup helpers for GPIO descriptors
> (gpiod_put and gpiod_put_array), converts gpiod_get_array() to use
> them, reworks descriptor array allocation to avoid krealloc(),
> switches fastpath bitmaps in struct gpio_array to bitmap_zalloc()
> and bitmap_free(), and uses the %*pb format specifier when printing
> array masks.
>
> [...]

Applied, thanks!

[4/8] gpiolib: add support for scope-based management of GPIO descriptors
https://git.kernel.org/brgl/c/fea70edc18a1bd360c2f1b090662dde3d38d5357
[5/8] gpiolib: use __free(gpiod_put_array) in gpiod_get_array()
https://git.kernel.org/brgl/c/d8e2afd9d40f7ad9514fbf7aa725558448f7d679
[6/8] gpiolib: avoid krealloc() in gpiod_get_array()
https://git.kernel.org/brgl/c/7d930a8b28f40ed7737b49b8143fda2489732e22
[7/8] gpiolib: use bitmap_zalloc() for fastpath bitmaps
https://git.kernel.org/brgl/c/fc5fab320c2b8bdabc0412d3f5a5d1e058a56d87
[8/8] gpiolib: use %*pb format specifier when printing array masks
https://git.kernel.org/brgl/c/90000c03a9f6c74759f773a5078088db81514347

Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>