Skip to contentSkip to conversation

gpio: sodaville: allow COMPILE_TEST builds

PATCH In review Rosen Penev 3 participants 5 messages May 9 – May 12 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: sodaville: allow COMPILE_TEST builds

The Intel Sodaville GPIO driver uses PCI/MMIO and generic GPIO helpers, and builds outside X86. Move its Kconfig entry out of the X86-only port-I/O menu and allow it to be selected with COMPILE_TEST.

Tested with:
make LLVM=1 ARCH=loongarch drivers/gpio/gpio-sodaville.o

Assisted-by Codex:GPT-5.5
---
 drivers/gpio/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpio/Kconfig +3 -3
index f8e34b16fd99..9e1ed0f451b9 100644
@@ -1908,16 +1908,16 @@ config GPIO_RDC321X
 	  Support for the RDC R321x SoC GPIOs over southbridge
 	  PCI configuration space.
 
+endmenu
+
 config GPIO_SODAVILLE
 	bool "Intel Sodaville GPIO support"
-	depends on X86 && OF
+	depends on (X86 || COMPILE_TEST) && OF
 	select GPIO_GENERIC
 	select GENERIC_IRQ_CHIP
 	help
 	  Say Y here to support Intel Sodaville GPIO.
 
-endmenu
-
 menu "SPI GPIO expanders"
 	depends on SPI_MASTER
 
Signature · 1 line
2.54.0
#1 lore raw
Quoted 38 lines · Rosen Penev

The Intel Sodaville GPIO driver uses PCI/MMIO and generic GPIO helpers, and builds outside X86. Move its Kconfig entry out of the X86-only port-I/O menu and allow it to be selected with COMPILE_TEST.

Tested with:
make LLVM=1 ARCH=loongarch drivers/gpio/gpio-sodaville.o

Assisted-by Codex:GPT-5.5
---
 drivers/gpio/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpio/Kconfig +3 -4
index f8e34b16fd99..9e1ed0f451b9 100644
@@ -1908,16 +1908,16 @@ config GPIO_RDC321X
 	  Support for the RDC R321x SoC GPIOs over southbridge
 	  PCI configuration space.
 
+endmenu
+
 config GPIO_SODAVILLE
 	bool "Intel Sodaville GPIO support"
-	depends on X86 && OF
+	depends on (X86 || COMPILE_TEST) && OF
 	select GPIO_GENERIC
 	select GENERIC_IRQ_CHIP
 	help
 	  Say Y here to support Intel Sodaville GPIO.
 
-endmenu
-
 menu "SPI GPIO expanders"
 	depends on SPI_MASTER
 
--
Quoted 3 lines

2.54.0

I don't mind it but I'll wait for an Ack from Intel GPIO maintainers.

Bart

#2 lore raw
Quoted 39 lines · Bartosz Golaszewski
Quoted 37 lines · Rosen Penev

The Intel Sodaville GPIO driver uses PCI/MMIO and generic GPIO helpers, and builds outside X86. Move its Kconfig entry out of the X86-only port-I/O menu and allow it to be selected with COMPILE_TEST.

Tested with:
make LLVM=1 ARCH=loongarch drivers/gpio/gpio-sodaville.o

Assisted-by Codex:GPT-5.5
---
 drivers/gpio/Kconfig | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpio/Kconfig +3 -3
index f8e34b16fd99..9e1ed0f451b9 100644
@@ -1908,16 +1908,16 @@ config GPIO_RDC321X
        Support for the RDC R321x SoC GPIOs over southbridge
        PCI configuration space.
 
+endmenu
+
 config GPIO_SODAVILLE
      bool "Intel Sodaville GPIO support"
-     depends on X86 && OF
+     depends on (X86 || COMPILE_TEST) && OF
      select GPIO_GENERIC
      select GENERIC_IRQ_CHIP
      help
        Say Y here to support Intel Sodaville GPIO.
 
-endmenu
-
 menu "SPI GPIO expanders"
      depends on SPI_MASTER
 
Quoted 6 lines
Quoted 4 lines

--
2.54.0

I don't mind it but I'll wait for an Ack from Intel GPIO maintainers.

This commit was slop. Will redo.

Quoted 2 lines

Bart

#3 lore raw
In reply to Rosen Penev
kernel test robot noticed the following build errors:

Hi Rosen,

kernel test robot noticed the following build errors:

[auto build test ERROR on brgl/gpio/for-next]
[also build test ERROR on linus/master v7.1-rc3 next-20260508] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Rosen-Penev/gpio-sodaville-allow-COMPILE_TEST-builds/20260512-125042
base:   https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
patch link:    https://lore.kernel.org/r/20260509003327.955942-1-rosenp%40gmail.com
patch subject: [PATCH] gpio: sodaville: allow COMPILE_TEST builds
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20260512/[email protected]/config)
compiler: sh4-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260512/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

drivers/gpio/gpio-sodaville.c:253:1: warning: data definition has no type or storage class

     253 | builtin_pci_driver(sdv_gpio_driver);
         | ^~~~~~~~~~~~~~~~~~
   drivers/gpio/gpio-sodaville.c:253:1: error: type defaults to 'int' in declaration of 'builtin_pci_driver' [-Wimplicit-int]
>> drivers/gpio/gpio-sodaville.c:253:1: error: parameter names (without types) in function declaration [-Wdeclaration-missing-parameter-type]
   drivers/gpio/gpio-sodaville.c:245:26: warning: 'sdv_gpio_driver' defined but not used [-Wunused-variable]
     245 | static struct pci_driver sdv_gpio_driver = {
         |                          ^~~~~~~~~~~~~~~

vim +253 drivers/gpio/gpio-sodaville.c

b43ab901d671e3e Sebastian Andrzej Siewior 2011-06-27  244  
b43ab901d671e3e Sebastian Andrzej Siewior 2011-06-27  245  static struct pci_driver sdv_gpio_driver = {
6a5ead91d45d091 Paul Gortmaker            2016-05-09  246  	.driver = {
6a5ead91d45d091 Paul Gortmaker            2016-05-09  247  		.suppress_bind_attrs = true,
6a5ead91d45d091 Paul Gortmaker            2016-05-09  248  	},
b43ab901d671e3e Sebastian Andrzej Siewior 2011-06-27  249  	.name = DRV_NAME,
b43ab901d671e3e Sebastian Andrzej Siewior 2011-06-27  250  	.id_table = sdv_gpio_pci_ids,
b43ab901d671e3e Sebastian Andrzej Siewior 2011-06-27  251  	.probe = sdv_gpio_probe,
b43ab901d671e3e Sebastian Andrzej Siewior 2011-06-27  252  };

6a5ead91d45d091 Paul Gortmaker 2016-05-09 @253 builtin_pci_driver(sdv_gpio_driver);

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#4 lore raw
In reply to Rosen Penev
kernel test robot noticed the following build errors:

Hi Rosen,

kernel test robot noticed the following build errors:

[auto build test ERROR on brgl/gpio/for-next]
[also build test ERROR on linus/master v7.1-rc3 next-20260508] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Rosen-Penev/gpio-sodaville-allow-COMPILE_TEST-builds/20260512-125042
base:   https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
patch link:    https://lore.kernel.org/r/20260509003327.955942-1-rosenp%40gmail.com
patch subject: [PATCH] gpio: sodaville: allow COMPILE_TEST builds
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20260512/[email protected]/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260512/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

>> drivers/gpio/gpio-sodaville.c:253:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
     253 | builtin_pci_driver(sdv_gpio_driver);
         | ^
         | int
>> drivers/gpio/gpio-sodaville.c:253:20: error: a parameter list without types is only allowed in a function definition
     253 | builtin_pci_driver(sdv_gpio_driver);
         |                    ^

2 errors generated.

vim +/int +253 drivers/gpio/gpio-sodaville.c

b43ab901d671e3 Sebastian Andrzej Siewior 2011-06-27  244  
b43ab901d671e3 Sebastian Andrzej Siewior 2011-06-27  245  static struct pci_driver sdv_gpio_driver = {
6a5ead91d45d09 Paul Gortmaker            2016-05-09  246  	.driver = {
6a5ead91d45d09 Paul Gortmaker            2016-05-09  247  		.suppress_bind_attrs = true,
6a5ead91d45d09 Paul Gortmaker            2016-05-09  248  	},
b43ab901d671e3 Sebastian Andrzej Siewior 2011-06-27  249  	.name = DRV_NAME,
b43ab901d671e3 Sebastian Andrzej Siewior 2011-06-27  250  	.id_table = sdv_gpio_pci_ids,
b43ab901d671e3 Sebastian Andrzej Siewior 2011-06-27  251  	.probe = sdv_gpio_probe,
b43ab901d671e3 Sebastian Andrzej Siewior 2011-06-27  252  };

6a5ead91d45d09 Paul Gortmaker 2016-05-09 @253 builtin_pci_driver(sdv_gpio_driver);

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki