Skip to contentSkip to conversation

watchdog: lenovo_se10_wdt: add HAS_IOPORT dependency

PATCH In review Arnd Bergmann 3 participants 3 messages May 28, 2024 Watchdog device drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 watchdog: lenovo_se10_wdt: add HAS_IOPORT dependency

From: Arnd Bergmann <[email protected]>

Once the inb()/outb() helpers become conditional, the newly added driver fails to link on targets without CONFIG_HAS_IOPORT:

In file included from arch/arm64/include/asm/io.h:299,

                 from include/linux/io.h:14,
                 from drivers/watchdog/lenovo_se10_wdt.c:8:

drivers/watchdog/lenovo_se10_wdt.c: In function 'set_bram':
include/asm-generic/io.h:596:15: error: call to '_outb' declared with attribute error: outb() requires CONFIG_HAS_IOPORT
596 | #define _outb _outb
include/asm-generic/io.h:655:14: note: in expansion of macro '_outb'
655 | #define outb _outb

      |              ^~~~~
drivers/watchdog/lenovo_se10_wdt.c:67:9: note: in expansion of macro 'outb'
   67 |         outb(offset, bram_base);
      |         ^~~~

Add the same dependency we added to the other such drivers.

Fixes 1f6602c8ed1e ("watchdog: lenovo_se10_wdt: Watchdog driver for Lenovo SE10 platform")
---
 drivers/watchdog/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/watchdog/Kconfig +1 -0
index 5f91921afc79..24ea3b6f95fe 100644
@@ -257,6 +257,7 @@ config GPIO_WATCHDOG_ARCH_INITCALL
 config LENOVO_SE10_WDT
 	tristate "Lenovo SE10 Watchdog"
 	depends on (X86 && DMI) || COMPILE_TEST
+	depends on HAS_IOPORT
 	select WATCHDOG_CORE
 	help
 	  If you say yes here you get support for the watchdog
Signature · 1 line
2.39.2
#1 lore raw

Hi Arnd,

Quoted 14 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Once the inb()/outb() helpers become conditional, the newly added driver fails to link on targets without CONFIG_HAS_IOPORT:

In file included from arch/arm64/include/asm/io.h:299,

                 from include/linux/io.h:14,
                 from drivers/watchdog/lenovo_se10_wdt.c:8:

drivers/watchdog/lenovo_se10_wdt.c: In function 'set_bram':
include/asm-generic/io.h:596:15: error: call to '_outb' declared with attribute error: outb() requires CONFIG_HAS_IOPORT
596 | #define _outb _outb
include/asm-generic/io.h:655:14: note: in expansion of macro '_outb'
655 | #define outb _outb

Quoted 8 lines
      |              ^~~~~
drivers/watchdog/lenovo_se10_wdt.c:67:9: note: in expansion of macro 
'outb'
   67 |         outb(offset, bram_base);
      |         ^~~~

Add the same dependency we added to the other such drivers.

Ah - good catch, and my apologies.

Quoted 21 lines
Fixes 1f6602c8ed1e ("watchdog: lenovo_se10_wdt: Watchdog driver for

Lenovo SE10 platform")

---
 drivers/watchdog/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/watchdog/Kconfig +1 -0
index 5f91921afc79..24ea3b6f95fe 100644
@@ -257,6 +257,7 @@ config GPIO_WATCHDOG_ARCH_INITCALL
 config LENOVO_SE10_WDT
 	tristate "Lenovo SE10 Watchdog"
 	depends on (X86 && DMI) || COMPILE_TEST
+	depends on HAS_IOPORT
 	select WATCHDOG_CORE
 	help
 	  If you say yes here you get support for the watchdog
Signature · 1 line
2.39.2

Looks good to me. Thanks for the fix. Reviewed-by Mark Pearson <[email protected]>

Mark

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Arnd Bergmann
Quoted 18 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

Once the inb()/outb() helpers become conditional, the newly added driver fails to link on targets without CONFIG_HAS_IOPORT:

In file included from arch/arm64/include/asm/io.h:299,

                  from include/linux/io.h:14,
                  from drivers/watchdog/lenovo_se10_wdt.c:8:

drivers/watchdog/lenovo_se10_wdt.c: In function 'set_bram':
include/asm-generic/io.h:596:15: error: call to '_outb' declared with attribute error: outb() requires CONFIG_HAS_IOPORT
596 | #define _outb _outb
include/asm-generic/io.h:655:14: note: in expansion of macro '_outb'
655 | #define outb _outb

       |              ^~~~~
drivers/watchdog/lenovo_se10_wdt.c:67:9: note: in expansion of macro 'outb'
    67 |         outb(offset, bram_base);
       |         ^~~~
Quoted 4 lines

Add the same dependency we added to the other such drivers.

Fixes 1f6602c8ed1e ("watchdog: lenovo_se10_wdt: Watchdog driver for Lenovo SE10 platform")
Quoted 16 lines
---
  drivers/watchdog/Kconfig | 1 +
  1 file changed, 1 insertion(+)
drivers/watchdog/Kconfig +1 -0
index 5f91921afc79..24ea3b6f95fe 100644
@@ -257,6 +257,7 @@ config GPIO_WATCHDOG_ARCH_INITCALL
  config LENOVO_SE10_WDT
  	tristate "Lenovo SE10 Watchdog"
  	depends on (X86 && DMI) || COMPILE_TEST
+	depends on HAS_IOPORT
  	select WATCHDOG_CORE
  	help
  	  If you say yes here you get support for the watchdog