All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] watchdog: lenovo_se10_wdt: add HAS_IOPORT dependency
@ 2024-05-28 12:07 Arnd Bergmann
  2024-05-28 12:28 ` Mark Pearson
  2024-05-28 13:37 ` Guenter Roeck
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2024-05-28 12:07 UTC (permalink / raw)
  To: Wim Van Sebroeck, Guenter Roeck, Mark Pearson, David Ober
  Cc: Arnd Bergmann, Hans de Goede, linux-watchdog, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/watchdog/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 5f91921afc79..24ea3b6f95fe 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -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
-- 
2.39.2


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

* Re: [PATCH] watchdog: lenovo_se10_wdt: add HAS_IOPORT dependency
  2024-05-28 12:07 [PATCH] watchdog: lenovo_se10_wdt: add HAS_IOPORT dependency Arnd Bergmann
@ 2024-05-28 12:28 ` Mark Pearson
  2024-05-28 13:37 ` Guenter Roeck
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Pearson @ 2024-05-28 12:28 UTC (permalink / raw)
  To: Arnd Bergmann, Wim Van Sebroeck, Guenter Roeck, David Ober
  Cc: Arnd Bergmann, Hans de Goede, linux-watchdog, linux-kernel

Hi Arnd,

On Tue, May 28, 2024, at 8:07 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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.
>
Ah - good catch, and my apologies.

> Fixes: 1f6602c8ed1e ("watchdog: lenovo_se10_wdt: Watchdog driver for 
> Lenovo SE10 platform")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/watchdog/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index 5f91921afc79..24ea3b6f95fe 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -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
> -- 
> 2.39.2
Looks good to me. Thanks for the fix.
Reviewed-by Mark Pearson <mpearson-lenovo@squebb.ca>

Mark

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

* Re: [PATCH] watchdog: lenovo_se10_wdt: add HAS_IOPORT dependency
  2024-05-28 12:07 [PATCH] watchdog: lenovo_se10_wdt: add HAS_IOPORT dependency Arnd Bergmann
  2024-05-28 12:28 ` Mark Pearson
@ 2024-05-28 13:37 ` Guenter Roeck
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2024-05-28 13:37 UTC (permalink / raw)
  To: Arnd Bergmann, Wim Van Sebroeck, Mark Pearson, David Ober
  Cc: Arnd Bergmann, Hans de Goede, linux-watchdog, linux-kernel

On 5/28/24 05:07, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> 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")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index 5f91921afc79..24ea3b6f95fe 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -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


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

end of thread, other threads:[~2024-05-28 13:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-28 12:07 [PATCH] watchdog: lenovo_se10_wdt: add HAS_IOPORT dependency Arnd Bergmann
2024-05-28 12:28 ` Mark Pearson
2024-05-28 13:37 ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.