drivers/gpio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
When building gpio-ich.c for a platform that does not have IO port
access like s390, there are several errors due to the use of inl() and
outl() throughout the driver:
drivers/gpio/gpio-ich.c: In function 'ichx_read_bit':
include/asm-generic/io.h:578:14: error: call to '_inl' declared with attribute error: inl() requires CONFIG_HAS_IOPORT
Only allow compile testing when the targeted platform selects HAS_IOPORT
so that there are no compile time errors.
Fixes: f3592d252f77 ("gpio: ich: enable building with COMPILE_TEST=y")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202504171941.g1yXja0j-lkp@intel.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
drivers/gpio/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index bbbb550cac93..13b7319162c8 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -380,7 +380,7 @@ config GPIO_HLWD
config GPIO_ICH
tristate "Intel ICH GPIO"
- depends on (X86 && LPC_ICH) || COMPILE_TEST
+ depends on (X86 && LPC_ICH) || (COMPILE_TEST && HAS_IOPORT)
help
Say yes here to support the GPIO functionality of a number of Intel
ICH-based chipsets. Currently supported devices: ICH6, ICH7, ICH8
---
base-commit: 550300b9a295a591e0721a31f8c964a4bc08d51c
change-id: 20250418-gpio-ich-fix-build-without-ioport-75816ba7b45a
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Fri, 18 Apr 2025 16:17:20 -0400, Nathan Chancellor wrote:
> When building gpio-ich.c for a platform that does not have IO port
> access like s390, there are several errors due to the use of inl() and
> outl() throughout the driver:
>
> drivers/gpio/gpio-ich.c: In function 'ichx_read_bit':
> include/asm-generic/io.h:578:14: error: call to '_inl' declared with attribute error: inl() requires CONFIG_HAS_IOPORT
>
> [...]
Applied, thanks!
[1/1] gpio: Restrict GPIO_ICH to compile testing with HAS_IOPORT
https://git.kernel.org/brgl/linux/c/29f4c4da74acfbd54f5ad2dfafe1a8f93af00431
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
© 2016 - 2025 Red Hat, Inc.