mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] pinctrl: include linux/errno.h in consumer.h for ENOTSUPP
@ 2026-09-24  6:55 Mehmet Fide
  2026-09-24  7:45 ` Bartosz Golaszewski
  2026-09-24 11:18 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Mehmet Fide @ 2026-09-24  6:55 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Bartosz Golaszewski, Haibo Chen, kernel test robot, linux-gpio,
	linux-kernel

From: Mehmet Fide <mehmet.fide@screeningeagle.com>

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@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202609240855.U59akHDO-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202609241240.61Hz5rix-lkp@intel.com/
Signed-off-by: Mehmet Fide <mehmet.fide@screeningeagle.com>
---
 include/linux/pinctrl/consumer.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h
index 7be49d447426..81e7866bd2e3 100644
--- a/include/linux/pinctrl/consumer.h
+++ b/include/linux/pinctrl/consumer.h
@@ -12,6 +12,7 @@
 #define __LINUX_PINCTRL_CONSUMER_H
 
 #include <linux/err.h>
+#include <linux/errno.h>
 #include <linux/types.h>
 
 #include <linux/pinctrl/pinctrl-state.h>
-- 
2.55.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: include linux/errno.h in consumer.h for ENOTSUPP
  2026-09-24  6:55 [PATCH] pinctrl: include linux/errno.h in consumer.h for ENOTSUPP Mehmet Fide
@ 2026-09-24  7:45 ` Bartosz Golaszewski
  2026-09-24 11:18 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2026-09-24  7:45 UTC (permalink / raw)
  To: Mehmet Fide
  Cc: Bartosz Golaszewski, Haibo Chen, kernel test robot, linux-gpio,
	linux-kernel, Linus Walleij, Bartosz Golaszewski

On Thu, 24 Sep 2026 08:55:14 +0200, Mehmet Fide <mehmet.fide@gmail.com> said:
> From: Mehmet Fide <mehmet.fide@screeningeagle.com>
>
> 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@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202609240855.U59akHDO-lkp@intel.com/
> Closes: https://lore.kernel.org/oe-kbuild-all/202609241240.61Hz5rix-lkp@intel.com/
> Signed-off-by: Mehmet Fide <mehmet.fide@screeningeagle.com>
> ---
>  include/linux/pinctrl/consumer.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/include/linux/pinctrl/consumer.h b/include/linux/pinctrl/consumer.h
> index 7be49d447426..81e7866bd2e3 100644
> --- a/include/linux/pinctrl/consumer.h
> +++ b/include/linux/pinctrl/consumer.h
> @@ -12,6 +12,7 @@
>  #define __LINUX_PINCTRL_CONSUMER_H
>
>  #include <linux/err.h>
> +#include <linux/errno.h>
>  #include <linux/types.h>
>
>  #include <linux/pinctrl/pinctrl-state.h>
> --
> 2.55.0
>
>

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pinctrl: include linux/errno.h in consumer.h for ENOTSUPP
  2026-09-24  6:55 [PATCH] pinctrl: include linux/errno.h in consumer.h for ENOTSUPP Mehmet Fide
  2026-09-24  7:45 ` Bartosz Golaszewski
@ 2026-09-24 11:18 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2026-09-24 11:18 UTC (permalink / raw)
  To: Mehmet Fide
  Cc: Bartosz Golaszewski, Bartosz Golaszewski, Haibo Chen,
	kernel test robot, linux-gpio, linux-kernel

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

> From: Mehmet Fide <mehmet.fide@screeningeagle.com>
>
> 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@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202609240855.U59akHDO-lkp@intel.com/
> Closes: https://lore.kernel.org/oe-kbuild-all/202609241240.61Hz5rix-lkp@intel.com/
> Signed-off-by: Mehmet Fide <mehmet.fide@screeningeagle.com>

Patch applied!

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-24 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-24  6:55 [PATCH] pinctrl: include linux/errno.h in consumer.h for ENOTSUPP Mehmet Fide
2026-09-24  7:45 ` Bartosz Golaszewski
2026-09-24 11:18 ` Linus Walleij

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®