Re: [PATCH] pinctrl: include linux/errno.h in consumer.h for ENOTSUPP

From: Linus Walleij

Date: Thu Sep 24 2026 - 07:24:20 EST


On Thu, Sep 24, 2026 at 8:55 AM Mehmet Fide <mehmet.fide@xxxxxxxxx> wrote:

> From: Mehmet Fide <mehmet.fide@xxxxxxxxxxxxxxxxxx>
>
> The CONFIG_PINCTRL=n stubs of pinctrl_gpio_get_config() and
> pinctrl_gpio_set_config() return -ENOTSUPP, but the header only pulls in
> linux/err.h, which provides asm/errno.h and not the kernel-internal
> ENOTSUPP from linux/errno.h. A translation unit that includes
> pinctrl/consumer.h before anything else fails to build:
>
> include/linux/pinctrl/consumer.h:110:10: error: use of undeclared identifier 'ENOTSUPP'
>
> Include linux/errno.h explicitly.
>
> Fixes: b44aec87658e ("pinctrl: make the CONFIG_PINCTRL=n gpio config stubs return -ENOTSUPP")
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/oe-kbuild-all/202609240855.U59akHDO-lkp@xxxxxxxxx/
> Closes: https://lore.kernel.org/oe-kbuild-all/202609241240.61Hz5rix-lkp@xxxxxxxxx/
> Signed-off-by: Mehmet Fide <mehmet.fide@xxxxxxxxxxxxxxxxxx>

Patch applied!

Yours,
Linus Walleij