Linux-Watchdog Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] watchdog: da9062: Add dependency on I2C
@ 2020-02-08 13:08 Guenter Roeck
  2020-02-08 13:56 ` Marco Felsch
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Guenter Roeck @ 2020-02-08 13:08 UTC (permalink / raw)
  To: Wim Van Sebroeck
  Cc: linux-watchdog, linux-kernel, Guenter Roeck, Marco Felsch,
	Adam Thomson, Stefan Lengfeld

Since commit 057b52b4b3d58 ("watchdog: da9062: make restart handler atomic
safe"), the driver calls i2c functions directly. It now therefore depends
on I2C. This is a hard dependency which overrides COMPILE_TEST.

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 057b52b4b3d58 ("watchdog: da9062: make restart handler atomic safe")
Cc: Marco Felsch <m.felsch@pengutronix.de>
Cc: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Cc: Stefan Lengfeld <contact@stefanchrist.eu>
Signed-off-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 c3c8e0786a99..9ea2b43d4b01 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -207,6 +207,7 @@ config DA9063_WATCHDOG
 config DA9062_WATCHDOG
 	tristate "Dialog DA9062/61 Watchdog"
 	depends on MFD_DA9062 || COMPILE_TEST
+	depends on I2C
 	select WATCHDOG_CORE
 	help
 	  Support for the watchdog in the DA9062 and DA9061 PMICs.
-- 
2.17.1


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

* Re: [PATCH] watchdog: da9062: Add dependency on I2C
  2020-02-08 13:08 [PATCH] watchdog: da9062: Add dependency on I2C Guenter Roeck
@ 2020-02-08 13:56 ` Marco Felsch
  2020-02-08 14:01 ` Marco Felsch
  2020-02-12 14:12 ` Geert Uytterhoeven
  2 siblings, 0 replies; 6+ messages in thread
From: Marco Felsch @ 2020-02-08 13:56 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, linux-watchdog, linux-kernel, Adam Thomson,
	Stefan Lengfeld

Hi Guenter,

thanks for fixing that.

On 20-02-08 05:08, Guenter Roeck wrote:
> Since commit 057b52b4b3d58 ("watchdog: da9062: make restart handler atomic
> safe"), the driver calls i2c functions directly. It now therefore depends
> on I2C. This is a hard dependency which overrides COMPILE_TEST.
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Fixes: 057b52b4b3d58 ("watchdog: da9062: make restart handler atomic safe")
> Cc: Marco Felsch <m.felsch@pengutronix.de>
> Cc: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> Cc: Stefan Lengfeld <contact@stefanchrist.eu>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> 

> ---
>  drivers/watchdog/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
> index c3c8e0786a99..9ea2b43d4b01 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -207,6 +207,7 @@ config DA9063_WATCHDOG
>  config DA9062_WATCHDOG
>  	tristate "Dialog DA9062/61 Watchdog"
>  	depends on MFD_DA9062 || COMPILE_TEST
> +	depends on I2C
>  	select WATCHDOG_CORE
>  	help
>  	  Support for the watchdog in the DA9062 and DA9061 PMICs.
> -- 
> 2.17.1

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

* Re: [PATCH] watchdog: da9062: Add dependency on I2C
  2020-02-08 13:08 [PATCH] watchdog: da9062: Add dependency on I2C Guenter Roeck
  2020-02-08 13:56 ` Marco Felsch
@ 2020-02-08 14:01 ` Marco Felsch
  2020-02-08 14:22   ` Guenter Roeck
  2020-02-12 14:12 ` Geert Uytterhoeven
  2 siblings, 1 reply; 6+ messages in thread
From: Marco Felsch @ 2020-02-08 14:01 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, linux-watchdog, linux-kernel, Adam Thomson,
	Stefan Lengfeld

Hi,

On 20-02-08 05:08, Guenter Roeck wrote:
> Since commit 057b52b4b3d58 ("watchdog: da9062: make restart handler atomic
> safe"), the driver calls i2c functions directly. It now therefore depends
> on I2C. This is a hard dependency which overrides COMPILE_TEST.

I just wondered why it doesn't complain if no regmap support is on and
surprise it provides stubs ^^ Is it worth to add i2c stubs too?

Regards,
  Marco

> Reported-by: kbuild test robot <lkp@intel.com>
> Fixes: 057b52b4b3d58 ("watchdog: da9062: make restart handler atomic safe")
> Cc: Marco Felsch <m.felsch@pengutronix.de>
> Cc: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> Cc: Stefan Lengfeld <contact@stefanchrist.eu>
> Signed-off-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 c3c8e0786a99..9ea2b43d4b01 100644
> --- a/drivers/watchdog/Kconfig
> +++ b/drivers/watchdog/Kconfig
> @@ -207,6 +207,7 @@ config DA9063_WATCHDOG
>  config DA9062_WATCHDOG
>  	tristate "Dialog DA9062/61 Watchdog"
>  	depends on MFD_DA9062 || COMPILE_TEST
> +	depends on I2C
>  	select WATCHDOG_CORE
>  	help
>  	  Support for the watchdog in the DA9062 and DA9061 PMICs.
> -- 
> 2.17.1
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH] watchdog: da9062: Add dependency on I2C
  2020-02-08 14:01 ` Marco Felsch
@ 2020-02-08 14:22   ` Guenter Roeck
  2020-02-10  8:53     ` Marco Felsch
  0 siblings, 1 reply; 6+ messages in thread
From: Guenter Roeck @ 2020-02-08 14:22 UTC (permalink / raw)
  To: Marco Felsch
  Cc: Wim Van Sebroeck, linux-watchdog, linux-kernel, Adam Thomson,
	Stefan Lengfeld

On 2/8/20 6:01 AM, Marco Felsch wrote:
> Hi,
> 
> On 20-02-08 05:08, Guenter Roeck wrote:
>> Since commit 057b52b4b3d58 ("watchdog: da9062: make restart handler atomic
>> safe"), the driver calls i2c functions directly. It now therefore depends
>> on I2C. This is a hard dependency which overrides COMPILE_TEST.
> 
> I just wondered why it doesn't complain if no regmap support is on and
> surprise it provides stubs ^^ Is it worth to add i2c stubs too?
> 

I'd rather not go there. In practice it doesn't make much of a difference -
it just ensures that COMPILE_TEST can run on architectures which don't
support I2C. I think 0day only finds it because they select COMPILE_TEST
and then selectively disable I2C (and maybe other configuration options)
to catch problems like this.

Guenter

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

* Re: [PATCH] watchdog: da9062: Add dependency on I2C
  2020-02-08 14:22   ` Guenter Roeck
@ 2020-02-10  8:53     ` Marco Felsch
  0 siblings, 0 replies; 6+ messages in thread
From: Marco Felsch @ 2020-02-10  8:53 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, linux-watchdog, linux-kernel, Adam Thomson,
	Stefan Lengfeld

On 20-02-08 06:22, Guenter Roeck wrote:
> On 2/8/20 6:01 AM, Marco Felsch wrote:
> > Hi,
> > 
> > On 20-02-08 05:08, Guenter Roeck wrote:
> > > Since commit 057b52b4b3d58 ("watchdog: da9062: make restart handler atomic
> > > safe"), the driver calls i2c functions directly. It now therefore depends
> > > on I2C. This is a hard dependency which overrides COMPILE_TEST.
> > 
> > I just wondered why it doesn't complain if no regmap support is on and
> > surprise it provides stubs ^^ Is it worth to add i2c stubs too?
> > 
> 
> I'd rather not go there. In practice it doesn't make much of a difference -
> it just ensures that COMPILE_TEST can run on architectures which don't
> support I2C. I think 0day only finds it because they select COMPILE_TEST
> and then selectively disable I2C (and maybe other configuration options)
> to catch problems like this.

I know, just saying that this is a bit confusing for a reader because
the deps are handled correctly by MFD_* and REGMAP_* symbols. Anyway
thanks for fixing the bug I introduced. I was a bit to busy last week.

Regards,
  Marco

> Guenter
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

* Re: [PATCH] watchdog: da9062: Add dependency on I2C
  2020-02-08 13:08 [PATCH] watchdog: da9062: Add dependency on I2C Guenter Roeck
  2020-02-08 13:56 ` Marco Felsch
  2020-02-08 14:01 ` Marco Felsch
@ 2020-02-12 14:12 ` Geert Uytterhoeven
  2 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2020-02-12 14:12 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Wim Van Sebroeck, Linux Watchdog Mailing List,
	Linux Kernel Mailing List, Marco Felsch, Adam Thomson,
	Stefan Lengfeld

On Sat, Feb 8, 2020 at 2:09 PM Guenter Roeck <linux@roeck-us.net> wrote:
> Since commit 057b52b4b3d58 ("watchdog: da9062: make restart handler atomic
> safe"), the driver calls i2c functions directly. It now therefore depends
> on I2C. This is a hard dependency which overrides COMPILE_TEST.
>
> Reported-by: kbuild test robot <lkp@intel.com>
> Fixes: 057b52b4b3d58 ("watchdog: da9062: make restart handler atomic safe")
> Cc: Marco Felsch <m.felsch@pengutronix.de>
> Cc: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
> Cc: Stefan Lengfeld <contact@stefanchrist.eu>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Just ran into the same issue, so
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-08 13:08 [PATCH] watchdog: da9062: Add dependency on I2C Guenter Roeck
2020-02-08 13:56 ` Marco Felsch
2020-02-08 14:01 ` Marco Felsch
2020-02-08 14:22   ` Guenter Roeck
2020-02-10  8:53     ` Marco Felsch
2020-02-12 14:12 ` Geert Uytterhoeven

Linux-Watchdog Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-watchdog/0 linux-watchdog/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-watchdog linux-watchdog/ https://lore.kernel.org/linux-watchdog \
		linux-watchdog@vger.kernel.org
	public-inbox-index linux-watchdog

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-watchdog


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git