pinctrl: include linux/errno.h in consumer.h for ENOTSUPP
Subsystems (2)
PATCH 1/1 pinctrl: include linux/errno.h in consumer.h for ENOTSUPP
From: Mehmet Fide <[email protected]>
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.
--- include/linux/pinctrl/consumer.h | 1 + 1 file changed, 1 insertion(+)
include/linux/pinctrl/consumer.h +1 -0
@@ -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>
Signature · 1 line
2.55.0
Quoted 34 lines · Mehmet Fide
From: Mehmet Fide <[email protected]>
The
CONFIG_PINCTRL=nstubs ofpinctrl_gpio_get_config()andpinctrl_gpio_set_config()return-ENOTSUPP, but the header only pulls inlinux/err.h, which providesasm/errno.hand not the kernel-internal ENOTSUPP fromlinux/errno.h. A translation unit that includespinctrl/consumer.hbefore anything else fails to build:
include/linux/pinctrl/consumer.h:110:10: error: use of undeclared identifier 'ENOTSUPP'Include
linux/errno.hexplicitly.Fixes b44aec87658e ("pinctrl: make the CONFIG_PINCTRL=n gpio config stubs return -ENOTSUPP")Reported-by kernel test robot <[email protected]>Signed-off-by Mehmet Fide <[email protected]>--- include/linux/pinctrl/consumer.h | 1 + 1 file changed, 1 insertion(+)include/linux/pinctrl/consumer.h +1
-1@@ -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> --
Quoted 3 lines
2.55.0
Linus Walleij
maintainerQuoted 10 lines · Mehmet Fide
From: Mehmet Fide <[email protected]>
The
CONFIG_PINCTRL=nstubs ofpinctrl_gpio_get_config()andpinctrl_gpio_set_config()return-ENOTSUPP, but the header only pulls inlinux/err.h, which providesasm/errno.hand not the kernel-internal ENOTSUPP fromlinux/errno.h. A translation unit that includespinctrl/consumer.hbefore anything else fails to build:
include/linux/pinctrl/consumer.h:110:10: error: use of undeclared identifier 'ENOTSUPP'
Quoted 7 lines
Include
linux/errno.hexplicitly.Fixes b44aec87658e ("pinctrl: make the CONFIG_PINCTRL=n gpio config stubs return -ENOTSUPP")Reported-by kernel test robot <[email protected]>Signed-off-by Mehmet Fide <[email protected]>
Patch applied!
Yours,
Linus Walleij