From: sashiko-bot@kernel.org
To: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
linux-gpio@vger.kernel.org
Subject: Re: [PATCH v1 1/3] gpiolib: Introduce devm_gpiochip_dispose_irq_mappings()
Date: Wed, 21 Oct 2026 20:56:35 +0000 [thread overview]
Message-ID: <sashiko-outbox-180664@kernel.org> (raw)
In-Reply-To: <20261021204654.1001101-2-andriy.shevchenko@linux.intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] gpiolib: build failure in gpiochip_dispose_irq_mappings() without IRQ_DOMAIN
--
commit c8fefed15e55a94335f2d9f38c7ab3dbbe263c9b
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
gpiolib: Introduce devm_gpiochip_dispose_irq_mappings()
This commit introduces the devm_gpiochip_dispose_irq_mappings() helper in
drivers/gpio/gpiolib-devres.c to deduplicate disposing of GPIO chip IRQ
mappings on device removal.
> diff --git a/drivers/gpio/gpiolib-devres.c b/drivers/gpio/gpiolib-devres.c
> index 2ec825ffab7da..e7e6690d699e7 100644
> --- a/drivers/gpio/gpiolib-devres.c
> +++ b/drivers/gpio/gpiolib-devres.c
[ ... ]
> @@ -323,6 +324,38 @@ void devm_gpiod_put_array(struct device *dev, struct gpio_descs *descs)
> }
> EXPORT_SYMBOL_GPL(devm_gpiod_put_array);
>
> +struct gpiochip_irqdomain {
> + struct gpio_chip *gc;
> + struct irq_domain *domain;
> +};
> +
> +static void gpiochip_dispose_irq_mappings(struct device *dev, void *res)
> +{
> + struct gpiochip_irqdomain *gcirq = res;
> +
> + for (unsigned int i = 0; i < gcirq->gc->ngpio; i++)
> + irq_dispose_mapping(irq_find_mapping(gcirq->domain, i));
> +}
[Severity: Low]
Will gpiochip_dispose_irq_mappings() in drivers/gpio/gpiolib-devres.c fail
to build when CONFIG_GPIOLIB=y and CONFIG_IRQ_DOMAIN is disabled?
In drivers/gpio/Makefile, gpiolib-devres.o is built whenever CONFIG_GPIOLIB
is enabled:
obj-$(CONFIG_GPIOLIB) += gpiolib-devres.o
In drivers/gpio/Kconfig, GPIOLIB does not select IRQ_DOMAIN (only
GPIOLIB_IRQCHIP selects it).
In include/linux/irqdomain.h, irq_find_mapping() is only defined inside the
CONFIG_IRQ_DOMAIN block, while the fallback block for !CONFIG_IRQ_DOMAIN
provides a stub for irq_dispose_mapping() but omits irq_find_mapping():
#else /* CONFIG_IRQ_DOMAIN */
static inline void irq_dispose_mapping(unsigned int virq) { }
static inline struct irq_domain *irq_find_matching_fwnode(...)
{
return NULL;
}
#endif /* !CONFIG_IRQ_DOMAIN */
Without a stub for irq_find_mapping() or a CONFIG_IRQ_DOMAIN guard, does
compiling drivers/gpio/gpiolib-devres.c with CONFIG_GPIOLIB=y and
CONFIG_IRQ_DOMAIN=n result in an implicit declaration error for
irq_find_mapping()?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261021204654.1001101-1-andriy.shevchenko@linux.intel.com?part=1
next prev parent reply other threads:[~2026-10-21 20:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-21 20:44 [PATCH v1 0/3] gpio: Introduce helper to dispose IRQ mappings Andy Shevchenko
2026-10-21 20:44 ` [PATCH v1 1/3] gpiolib: Introduce devm_gpiochip_dispose_irq_mappings() Andy Shevchenko
2026-10-21 20:56 ` sashiko-bot [this message]
2026-10-23 7:38 ` kernel test robot
2026-10-21 20:44 ` [PATCH v1 2/3] gpio: mockup: Replace custom devm_gpiochip_dispose_irq_mappings() Andy Shevchenko
2026-10-21 20:44 ` [PATCH v1 3/3] gpio: sim: " Andy Shevchenko
2026-10-22 9:11 ` [PATCH v1 0/3] gpio: Introduce helper to dispose IRQ mappings Bartosz Golaszewski
2026-10-22 13:32 ` Andy Shevchenko
2026-10-22 14:05 ` Bartosz Golaszewski
2026-10-22 14:39 ` 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=sashiko-outbox-180664@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-gpio@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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