Linux-Watchdog Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/5] firmware: imx: add COMPILE_TEST support
@ 2020-03-06 15:42 Anson Huang
  2020-03-06 15:42 ` [PATCH 2/5] rtc: add COMPILE_TEST support for i.MX SC RTC Anson Huang
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Anson Huang @ 2020-03-06 15:42 UTC (permalink / raw)
  To: shawnguo, s.hauer, kernel, festevam, dmitry.torokhov, a.zummo,
	alexandre.belloni, rui.zhang, daniel.lezcano, amit.kucheria, wim,
	linux, daniel.baluta, linux, gregkh, tglx, m.felsch,
	andriy.shevchenko, arnd, enric.balletbo, ronald, krzk,
	linux-arm-kernel, linux-kernel, linux-input, linux-rtc, linux-pm,
	linux-watchdog
  Cc: Linux-imx

Add COMPILE_TEST support to i.MX SCU drivers for better compile
testing coverage.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/firmware/imx/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/firmware/imx/Kconfig b/drivers/firmware/imx/Kconfig
index 1d2e5b8..116707a 100644
--- a/drivers/firmware/imx/Kconfig
+++ b/drivers/firmware/imx/Kconfig
@@ -12,7 +12,7 @@ config IMX_DSP
 
 config IMX_SCU
 	bool "IMX SCU Protocol driver"
-	depends on IMX_MBOX
+	depends on IMX_MBOX || COMPILE_TEST
 	help
 	  The System Controller Firmware (SCFW) is a low-level system function
 	  which runs on a dedicated Cortex-M core to provide power, clock, and
@@ -24,6 +24,6 @@ config IMX_SCU
 
 config IMX_SCU_PD
 	bool "IMX SCU Power Domain driver"
-	depends on IMX_SCU
+	depends on IMX_SCU || COMPILE_TEST
 	help
 	  The System Controller Firmware (SCFW) based power domain driver.
-- 
2.7.4


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

* [PATCH 2/5] rtc: add COMPILE_TEST support for i.MX SC RTC
  2020-03-06 15:42 [PATCH 1/5] firmware: imx: add COMPILE_TEST support Anson Huang
@ 2020-03-06 15:42 ` Anson Huang
  2020-03-06 15:42 ` [PATCH 3/5] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY Anson Huang
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 15+ messages in thread
From: Anson Huang @ 2020-03-06 15:42 UTC (permalink / raw)
  To: shawnguo, s.hauer, kernel, festevam, dmitry.torokhov, a.zummo,
	alexandre.belloni, rui.zhang, daniel.lezcano, amit.kucheria, wim,
	linux, daniel.baluta, linux, gregkh, tglx, m.felsch,
	andriy.shevchenko, arnd, enric.balletbo, ronald, krzk,
	linux-arm-kernel, linux-kernel, linux-input, linux-rtc, linux-pm,
	linux-watchdog
  Cc: Linux-imx

Add COMPILE_TEST support to i.MX SC RTC driver for better compile
testing coverage.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/rtc/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index acaf6f98..a86768f 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1772,7 +1772,7 @@ config RTC_DRV_SNVS
 	   will be called "rtc-snvs".
 
 config RTC_DRV_IMX_SC
-	depends on IMX_SCU
+	depends on IMX_SCU || COMPILE_TEST
 	depends on HAVE_ARM_SMCCC
 	tristate "NXP i.MX System Controller RTC support"
 	help
-- 
2.7.4


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

* [PATCH 3/5] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY
  2020-03-06 15:42 [PATCH 1/5] firmware: imx: add COMPILE_TEST support Anson Huang
  2020-03-06 15:42 ` [PATCH 2/5] rtc: add COMPILE_TEST support for i.MX SC RTC Anson Huang
@ 2020-03-06 15:42 ` Anson Huang
  2020-03-06 19:33   ` Dmitry Torokhov
  2020-03-06 15:42 ` [PATCH 4/5] watchdog: add COMPILE_TEST support for IMX_SC_WDT Anson Huang
  2020-03-06 15:42 ` [PATCH 5/5] thermal: add COMPILE_TEST support for IMX_SC_THERMAL Anson Huang
  3 siblings, 1 reply; 15+ messages in thread
From: Anson Huang @ 2020-03-06 15:42 UTC (permalink / raw)
  To: shawnguo, s.hauer, kernel, festevam, dmitry.torokhov, a.zummo,
	alexandre.belloni, rui.zhang, daniel.lezcano, amit.kucheria, wim,
	linux, daniel.baluta, linux, gregkh, tglx, m.felsch,
	andriy.shevchenko, arnd, enric.balletbo, ronald, krzk,
	linux-arm-kernel, linux-kernel, linux-input, linux-rtc, linux-pm,
	linux-watchdog
  Cc: Linux-imx

Add COMPILE_TEST support to i.MX SC keyboard driver for better compile
testing coverage.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/input/keyboard/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index 4706ff0..81e26f6 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -467,7 +467,7 @@ config KEYBOARD_IMX
 
 config KEYBOARD_IMX_SC_KEY
 	tristate "IMX SCU Key Driver"
-	depends on IMX_SCU
+	depends on IMX_SCU || COMPILE_TEST
 	help
 	  This is the system controller key driver for NXP i.MX SoCs with
 	  system controller inside.
-- 
2.7.4


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

* [PATCH 4/5] watchdog: add COMPILE_TEST support for IMX_SC_WDT
  2020-03-06 15:42 [PATCH 1/5] firmware: imx: add COMPILE_TEST support Anson Huang
  2020-03-06 15:42 ` [PATCH 2/5] rtc: add COMPILE_TEST support for i.MX SC RTC Anson Huang
  2020-03-06 15:42 ` [PATCH 3/5] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY Anson Huang
@ 2020-03-06 15:42 ` Anson Huang
  2020-03-06 15:42 ` [PATCH 5/5] thermal: add COMPILE_TEST support for IMX_SC_THERMAL Anson Huang
  3 siblings, 0 replies; 15+ messages in thread
From: Anson Huang @ 2020-03-06 15:42 UTC (permalink / raw)
  To: shawnguo, s.hauer, kernel, festevam, dmitry.torokhov, a.zummo,
	alexandre.belloni, rui.zhang, daniel.lezcano, amit.kucheria, wim,
	linux, daniel.baluta, linux, gregkh, tglx, m.felsch,
	andriy.shevchenko, arnd, enric.balletbo, ronald, krzk,
	linux-arm-kernel, linux-kernel, linux-input, linux-rtc, linux-pm,
	linux-watchdog
  Cc: Linux-imx

Add COMPILE_TEST support to i.MX SC watchdog driver for better compile
testing coverage.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/watchdog/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index 9ea2b43..6388154 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -712,7 +712,7 @@ config IMX2_WDT
 config IMX_SC_WDT
 	tristate "IMX SC Watchdog"
 	depends on HAVE_ARM_SMCCC
-	depends on IMX_SCU
+	depends on IMX_SCU || COMPILE_TEST
 	select WATCHDOG_CORE
 	help
 	  This is the driver for the system controller watchdog
-- 
2.7.4


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

* [PATCH 5/5] thermal: add COMPILE_TEST support for IMX_SC_THERMAL
  2020-03-06 15:42 [PATCH 1/5] firmware: imx: add COMPILE_TEST support Anson Huang
                   ` (2 preceding siblings ...)
  2020-03-06 15:42 ` [PATCH 4/5] watchdog: add COMPILE_TEST support for IMX_SC_WDT Anson Huang
@ 2020-03-06 15:42 ` Anson Huang
  2020-03-06 16:38   ` Amit Kucheria
  3 siblings, 1 reply; 15+ messages in thread
From: Anson Huang @ 2020-03-06 15:42 UTC (permalink / raw)
  To: shawnguo, s.hauer, kernel, festevam, dmitry.torokhov, a.zummo,
	alexandre.belloni, rui.zhang, daniel.lezcano, amit.kucheria, wim,
	linux, daniel.baluta, linux, gregkh, tglx, m.felsch,
	andriy.shevchenko, arnd, enric.balletbo, ronald, krzk,
	linux-arm-kernel, linux-kernel, linux-input, linux-rtc, linux-pm,
	linux-watchdog
  Cc: Linux-imx

Add COMPILE_TEST support to i.MX SC thermal driver for better compile
testing coverage.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/thermal/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
index 91af271..55c7641 100644
--- a/drivers/thermal/Kconfig
+++ b/drivers/thermal/Kconfig
@@ -254,7 +254,7 @@ config IMX_THERMAL
 
 config IMX_SC_THERMAL
 	tristate "Temperature sensor driver for NXP i.MX SoCs with System Controller"
-	depends on IMX_SCU
+	depends on IMX_SCU || COMPILE_TEST
 	depends on OF
 	help
 	  Support for Temperature Monitor (TEMPMON) found on NXP i.MX SoCs with
-- 
2.7.4


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

* Re: [PATCH 5/5] thermal: add COMPILE_TEST support for IMX_SC_THERMAL
  2020-03-06 15:42 ` [PATCH 5/5] thermal: add COMPILE_TEST support for IMX_SC_THERMAL Anson Huang
@ 2020-03-06 16:38   ` Amit Kucheria
  0 siblings, 0 replies; 15+ messages in thread
From: Amit Kucheria @ 2020-03-06 16:38 UTC (permalink / raw)
  To: Anson Huang
  Cc: Shawn Guo, Sascha Hauer, kernel, Fabio Estevam, dmitry.torokhov,
	a.zummo, alexandre.belloni, Zhang Rui, Daniel Lezcano, wim,
	linux, daniel.baluta, linux, Greg Kroah-Hartman, Thomas Gleixner,
	m.felsch, andriy.shevchenko, Arnd Bergmann,
	Enric Balletbo i Serra, ronald, Krzysztof Kozlowski, lakml, LKML,
	linux-input, linux-rtc, Linux PM list, linux-watchdog, Linux-imx

On Fri, Mar 6, 2020 at 9:19 PM Anson Huang <Anson.Huang@nxp.com> wrote:
>
> Add COMPILE_TEST support to i.MX SC thermal driver for better compile
> testing coverage.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
> ---
>  drivers/thermal/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig
> index 91af271..55c7641 100644
> --- a/drivers/thermal/Kconfig
> +++ b/drivers/thermal/Kconfig
> @@ -254,7 +254,7 @@ config IMX_THERMAL
>
>  config IMX_SC_THERMAL
>         tristate "Temperature sensor driver for NXP i.MX SoCs with System Controller"
> -       depends on IMX_SCU
> +       depends on IMX_SCU || COMPILE_TEST
>         depends on OF
>         help
>           Support for Temperature Monitor (TEMPMON) found on NXP i.MX SoCs with
> --
> 2.7.4
>

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

* Re: [PATCH 3/5] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY
  2020-03-06 15:42 ` [PATCH 3/5] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY Anson Huang
@ 2020-03-06 19:33   ` Dmitry Torokhov
  2020-03-06 20:05     ` Dmitry Torokhov
  0 siblings, 1 reply; 15+ messages in thread
From: Dmitry Torokhov @ 2020-03-06 19:33 UTC (permalink / raw)
  To: Anson Huang
  Cc: shawnguo, s.hauer, kernel, festevam, a.zummo, alexandre.belloni,
	rui.zhang, daniel.lezcano, amit.kucheria, wim, linux,
	daniel.baluta, linux, gregkh, tglx, m.felsch, andriy.shevchenko,
	arnd, enric.balletbo, ronald, krzk, linux-arm-kernel,
	linux-kernel, linux-input, linux-rtc, linux-pm, linux-watchdog,
	Linux-imx

On Fri, Mar 06, 2020 at 11:42:34PM +0800, Anson Huang wrote:
> Add COMPILE_TEST support to i.MX SC keyboard driver for better compile
> testing coverage.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>

Applied, thank you.

> ---
>  drivers/input/keyboard/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
> index 4706ff0..81e26f6 100644
> --- a/drivers/input/keyboard/Kconfig
> +++ b/drivers/input/keyboard/Kconfig
> @@ -467,7 +467,7 @@ config KEYBOARD_IMX
>  
>  config KEYBOARD_IMX_SC_KEY
>  	tristate "IMX SCU Key Driver"
> -	depends on IMX_SCU
> +	depends on IMX_SCU || COMPILE_TEST
>  	help
>  	  This is the system controller key driver for NXP i.MX SoCs with
>  	  system controller inside.
> -- 
> 2.7.4
> 

-- 
Dmitry

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

* Re: [PATCH 3/5] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY
  2020-03-06 19:33   ` Dmitry Torokhov
@ 2020-03-06 20:05     ` Dmitry Torokhov
  2020-03-06 21:15       ` Alexandre Belloni
  2020-03-07  0:18       ` Anson Huang
  0 siblings, 2 replies; 15+ messages in thread
From: Dmitry Torokhov @ 2020-03-06 20:05 UTC (permalink / raw)
  To: Anson Huang
  Cc: Shawn Guo, Sascha Hauer, Sascha Hauer, Fabio Estevam,
	Alessandro Zummo, Alexandre Belloni, Zhang Rui, Daniel Lezcano,
	amit.kucheria, wim, Guenter Roeck, Daniel Baluta, Oleksij Rempel,
	Greg Kroah-Hartman, Thomas Gleixner, Marco Felsch,
	Andy Shevchenko, Arnd Bergmann, Enric Balletbo i Serra,
	Ronald Tschalär, Krzysztof Kozlowski, linux-arm-kernel,
	lkml, linux-input, linux-rtc, Linux PM, LINUXWATCHDOG,
	NXP Linux Team

On Fri, Mar 6, 2020 at 11:33 AM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
>
> On Fri, Mar 06, 2020 at 11:42:34PM +0800, Anson Huang wrote:
> > Add COMPILE_TEST support to i.MX SC keyboard driver for better compile
> > testing coverage.
> >
> > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
>
> Applied, thank you.

Actually, not:

ERROR: "imx_scu_irq_register_notifier"
[drivers/input/keyboard/imx_sc_key.ko] undefined!
ERROR: "imx_scu_get_handle" [drivers/input/keyboard/imx_sc_key.ko] undefined!
ERROR: "imx_scu_call_rpc" [drivers/input/keyboard/imx_sc_key.ko] undefined!
ERROR: "imx_scu_irq_unregister_notifier"
[drivers/input/keyboard/imx_sc_key.ko] undefined!
ERROR: "imx_scu_irq_group_enable"
[drivers/input/keyboard/imx_sc_key.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make: *** [Makefile:1282: modules] Error 2

If you want to enable compile test coverage you need to provide stubs
for the above functions.

Thanks.

-- 
Dmitry

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

* Re: [PATCH 3/5] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY
  2020-03-06 20:05     ` Dmitry Torokhov
@ 2020-03-06 21:15       ` Alexandre Belloni
  2020-03-07  1:36         ` Anson Huang
  2020-03-07  0:18       ` Anson Huang
  1 sibling, 1 reply; 15+ messages in thread
From: Alexandre Belloni @ 2020-03-06 21:15 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Anson Huang, Shawn Guo, Sascha Hauer, Sascha Hauer,
	Fabio Estevam, Alessandro Zummo, Zhang Rui, Daniel Lezcano,
	amit.kucheria, wim, Guenter Roeck, Daniel Baluta, Oleksij Rempel,
	Greg Kroah-Hartman, Thomas Gleixner, Marco Felsch,
	Andy Shevchenko, Arnd Bergmann, Enric Balletbo i Serra,
	Ronald Tschalär, Krzysztof Kozlowski, linux-arm-kernel,
	lkml, linux-input, linux-rtc, Linux PM, LINUXWATCHDOG,
	NXP Linux Team

On 06/03/2020 12:05:42-0800, Dmitry Torokhov wrote:
> On Fri, Mar 6, 2020 at 11:33 AM Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> >
> > On Fri, Mar 06, 2020 at 11:42:34PM +0800, Anson Huang wrote:
> > > Add COMPILE_TEST support to i.MX SC keyboard driver for better compile
> > > testing coverage.
> > >
> > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> >
> > Applied, thank you.
> 
> Actually, not:
> 
> ERROR: "imx_scu_irq_register_notifier"
> [drivers/input/keyboard/imx_sc_key.ko] undefined!
> ERROR: "imx_scu_get_handle" [drivers/input/keyboard/imx_sc_key.ko] undefined!
> ERROR: "imx_scu_call_rpc" [drivers/input/keyboard/imx_sc_key.ko] undefined!
> ERROR: "imx_scu_irq_unregister_notifier"
> [drivers/input/keyboard/imx_sc_key.ko] undefined!
> ERROR: "imx_scu_irq_group_enable"
> [drivers/input/keyboard/imx_sc_key.ko] undefined!
> make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
> make: *** [Makefile:1282: modules] Error 2
> 
> If you want to enable compile test coverage you need to provide stubs
> for the above functions.
> 

or select IMX_SCU

or leave out COMPILE_TEST from the individual drivers as having
COMPILE_TEST for IMX_SCU is enough to be able to select the drivers.

> Thanks.
> 
> -- 
> Dmitry

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* RE: [PATCH 3/5] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY
  2020-03-06 20:05     ` Dmitry Torokhov
  2020-03-06 21:15       ` Alexandre Belloni
@ 2020-03-07  0:18       ` Anson Huang
  2020-03-07  0:51         ` Dmitry Torokhov
  1 sibling, 1 reply; 15+ messages in thread
From: Anson Huang @ 2020-03-07  0:18 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Shawn Guo, Sascha Hauer, Sascha Hauer, Fabio Estevam,
	Alessandro Zummo, Alexandre Belloni, Zhang Rui, Daniel Lezcano,
	amit.kucheria, wim, Guenter Roeck, Daniel Baluta, Oleksij Rempel,
	Greg Kroah-Hartman, Thomas Gleixner, Marco Felsch,
	Andy Shevchenko, Arnd Bergmann, Enric Balletbo i Serra,
	Ronald Tschalär, Krzysztof Kozlowski, linux-arm-kernel,
	lkml, linux-input, linux-rtc, Linux PM, LINUXWATCHDOG,
	dl-linux-imx

Hi, Dmitry

> Subject: Re: [PATCH 3/5] input: keyboard: add COMPILE_TEST support for
> KEYBOARD_IMX_SC_KEY
> 
> On Fri, Mar 6, 2020 at 11:33 AM Dmitry Torokhov
> <dmitry.torokhov@gmail.com> wrote:
> >
> > On Fri, Mar 06, 2020 at 11:42:34PM +0800, Anson Huang wrote:
> > > Add COMPILE_TEST support to i.MX SC keyboard driver for better
> > > compile testing coverage.
> > >
> > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> >
> > Applied, thank you.
> 
> Actually, not:
> 
> ERROR: "imx_scu_irq_register_notifier"
> [drivers/input/keyboard/imx_sc_key.ko] undefined!
> ERROR: "imx_scu_get_handle" [drivers/input/keyboard/imx_sc_key.ko]
> undefined!
> ERROR: "imx_scu_call_rpc" [drivers/input/keyboard/imx_sc_key.ko]
> undefined!
> ERROR: "imx_scu_irq_unregister_notifier"
> [drivers/input/keyboard/imx_sc_key.ko] undefined!
> ERROR: "imx_scu_irq_group_enable"
> [drivers/input/keyboard/imx_sc_key.ko] undefined!
> make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
> make: *** [Makefile:1282: modules] Error 2
> 
> If you want to enable compile test coverage you need to provide stubs for
> the above functions.

These i.MX SCU drivers depends on IMX_SCU, I already add the COMPILE_TEST
to IMX_SCU driver as well, that is why I put these patches in a patch series. Maybe
I can add stubs as well to make sure build passed even when IMX_SCU is NOT compiled?
Will send V2 to add stubs, it makes more sense.

Thanks,
Anson

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

* Re: [PATCH 3/5] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY
  2020-03-07  0:18       ` Anson Huang
@ 2020-03-07  0:51         ` Dmitry Torokhov
  2020-03-07  1:01           ` Anson Huang
  0 siblings, 1 reply; 15+ messages in thread
From: Dmitry Torokhov @ 2020-03-07  0:51 UTC (permalink / raw)
  To: Anson Huang
  Cc: Shawn Guo, Sascha Hauer, Sascha Hauer, Fabio Estevam,
	Alessandro Zummo, Alexandre Belloni, Zhang Rui, Daniel Lezcano,
	amit.kucheria, wim, Guenter Roeck, Daniel Baluta, Oleksij Rempel,
	Greg Kroah-Hartman, Thomas Gleixner, Marco Felsch,
	Andy Shevchenko, Arnd Bergmann, Enric Balletbo i Serra,
	Ronald Tschalär, Krzysztof Kozlowski, linux-arm-kernel,
	lkml, linux-input, linux-rtc, Linux PM, LINUXWATCHDOG,
	dl-linux-imx

On Sat, Mar 07, 2020 at 12:18:38AM +0000, Anson Huang wrote:
> Hi, Dmitry
> 
> > Subject: Re: [PATCH 3/5] input: keyboard: add COMPILE_TEST support for
> > KEYBOARD_IMX_SC_KEY
> > 
> > On Fri, Mar 6, 2020 at 11:33 AM Dmitry Torokhov
> > <dmitry.torokhov@gmail.com> wrote:
> > >
> > > On Fri, Mar 06, 2020 at 11:42:34PM +0800, Anson Huang wrote:
> > > > Add COMPILE_TEST support to i.MX SC keyboard driver for better
> > > > compile testing coverage.
> > > >
> > > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > >
> > > Applied, thank you.
> > 
> > Actually, not:
> > 
> > ERROR: "imx_scu_irq_register_notifier"
> > [drivers/input/keyboard/imx_sc_key.ko] undefined!
> > ERROR: "imx_scu_get_handle" [drivers/input/keyboard/imx_sc_key.ko]
> > undefined!
> > ERROR: "imx_scu_call_rpc" [drivers/input/keyboard/imx_sc_key.ko]
> > undefined!
> > ERROR: "imx_scu_irq_unregister_notifier"
> > [drivers/input/keyboard/imx_sc_key.ko] undefined!
> > ERROR: "imx_scu_irq_group_enable"
> > [drivers/input/keyboard/imx_sc_key.ko] undefined!
> > make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
> > make: *** [Makefile:1282: modules] Error 2
> > 
> > If you want to enable compile test coverage you need to provide stubs for
> > the above functions.
> 
> These i.MX SCU drivers depends on IMX_SCU, I already add the COMPILE_TEST
> to IMX_SCU driver as well, that is why I put these patches in a patch series.

Adding "|| COMPILE_TEST" you are removing hard dependency on IMX_SCU,
which as you can see can result in broken build.

> Maybe
> I can add stubs as well to make sure build passed even when IMX_SCU is NOT compiled?
> Will send V2 to add stubs, it makes more sense.

It is up to you whether you make IMX_SCU buildable with COMPILE_TEST
and leave the sub-driver as is, or add the stubs and make sub-drivers
buildable even without IMX_SCU being present.

Thanks.

-- 
Dmitry

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

* RE: [PATCH 3/5] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY
  2020-03-07  0:51         ` Dmitry Torokhov
@ 2020-03-07  1:01           ` Anson Huang
  0 siblings, 0 replies; 15+ messages in thread
From: Anson Huang @ 2020-03-07  1:01 UTC (permalink / raw)
  To: Dmitry Torokhov
  Cc: Shawn Guo, Sascha Hauer, Sascha Hauer, Fabio Estevam,
	Alessandro Zummo, Alexandre Belloni, Zhang Rui, Daniel Lezcano,
	amit.kucheria, wim, Guenter Roeck, Daniel Baluta, Oleksij Rempel,
	Greg Kroah-Hartman, Thomas Gleixner, Marco Felsch,
	Andy Shevchenko, Arnd Bergmann, Enric Balletbo i Serra,
	Ronald Tschalär, Krzysztof Kozlowski, linux-arm-kernel,
	lkml, linux-input, linux-rtc, Linux PM, LINUXWATCHDOG,
	dl-linux-imx

Hi, Dmitry

> Subject: Re: [PATCH 3/5] input: keyboard: add COMPILE_TEST support for
> KEYBOARD_IMX_SC_KEY
> 
> On Sat, Mar 07, 2020 at 12:18:38AM +0000, Anson Huang wrote:
> > Hi, Dmitry
> >
> > > Subject: Re: [PATCH 3/5] input: keyboard: add COMPILE_TEST support
> > > for KEYBOARD_IMX_SC_KEY
> > >
> > > On Fri, Mar 6, 2020 at 11:33 AM Dmitry Torokhov
> > > <dmitry.torokhov@gmail.com> wrote:
> > > >
> > > > On Fri, Mar 06, 2020 at 11:42:34PM +0800, Anson Huang wrote:
> > > > > Add COMPILE_TEST support to i.MX SC keyboard driver for better
> > > > > compile testing coverage.
> > > > >
> > > > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > > >
> > > > Applied, thank you.
> > >
> > > Actually, not:
> > >
> > > ERROR: "imx_scu_irq_register_notifier"
> > > [drivers/input/keyboard/imx_sc_key.ko] undefined!
> > > ERROR: "imx_scu_get_handle" [drivers/input/keyboard/imx_sc_key.ko]
> > > undefined!
> > > ERROR: "imx_scu_call_rpc" [drivers/input/keyboard/imx_sc_key.ko]
> > > undefined!
> > > ERROR: "imx_scu_irq_unregister_notifier"
> > > [drivers/input/keyboard/imx_sc_key.ko] undefined!
> > > ERROR: "imx_scu_irq_group_enable"
> > > [drivers/input/keyboard/imx_sc_key.ko] undefined!
> > > make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
> > > make: *** [Makefile:1282: modules] Error 2
> > >
> > > If you want to enable compile test coverage you need to provide
> > > stubs for the above functions.
> >
> > These i.MX SCU drivers depends on IMX_SCU, I already add the
> > COMPILE_TEST to IMX_SCU driver as well, that is why I put these patches in
> a patch series.
> 
> Adding "|| COMPILE_TEST" you are removing hard dependency on IMX_SCU,
> which as you can see can result in broken build.
> 
> > Maybe
> > I can add stubs as well to make sure build passed even when IMX_SCU is
> NOT compiled?
> > Will send V2 to add stubs, it makes more sense.
> 
> It is up to you whether you make IMX_SCU buildable with COMPILE_TEST and
> leave the sub-driver as is, or add the stubs and make sub-drivers buildable
> even without IMX_SCU being present.

Thank you, I already added COMPILE_TEST to IMX_SCU driver, and I will also add
stubs for those APIs in V2.

Thanks,
Anson

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

* RE: [PATCH 3/5] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY
  2020-03-06 21:15       ` Alexandre Belloni
@ 2020-03-07  1:36         ` Anson Huang
  2020-03-07  2:57           ` Alexandre Belloni
  0 siblings, 1 reply; 15+ messages in thread
From: Anson Huang @ 2020-03-07  1:36 UTC (permalink / raw)
  To: Alexandre Belloni, Dmitry Torokhov
  Cc: Shawn Guo, Sascha Hauer, Sascha Hauer, Fabio Estevam,
	Alessandro Zummo, Zhang Rui, Daniel Lezcano, amit.kucheria, wim,
	Guenter Roeck, Daniel Baluta, Oleksij Rempel, Greg Kroah-Hartman,
	Thomas Gleixner, Marco Felsch, Andy Shevchenko, Arnd Bergmann,
	Enric Balletbo i Serra, Ronald Tschalär,
	Krzysztof Kozlowski, linux-arm-kernel, lkml, linux-input,
	linux-rtc, Linux PM, LINUXWATCHDOG, dl-linux-imx

Hi, Alexandre

> Subject: Re: [PATCH 3/5] input: keyboard: add COMPILE_TEST support for
> KEYBOARD_IMX_SC_KEY
> 
> On 06/03/2020 12:05:42-0800, Dmitry Torokhov wrote:
> > On Fri, Mar 6, 2020 at 11:33 AM Dmitry Torokhov
> > <dmitry.torokhov@gmail.com> wrote:
> > >
> > > On Fri, Mar 06, 2020 at 11:42:34PM +0800, Anson Huang wrote:
> > > > Add COMPILE_TEST support to i.MX SC keyboard driver for better
> > > > compile testing coverage.
> > > >
> > > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > >
> > > Applied, thank you.
> >
> > Actually, not:
> >
> > ERROR: "imx_scu_irq_register_notifier"
> > [drivers/input/keyboard/imx_sc_key.ko] undefined!
> > ERROR: "imx_scu_get_handle" [drivers/input/keyboard/imx_sc_key.ko]
> undefined!
> > ERROR: "imx_scu_call_rpc" [drivers/input/keyboard/imx_sc_key.ko]
> undefined!
> > ERROR: "imx_scu_irq_unregister_notifier"
> > [drivers/input/keyboard/imx_sc_key.ko] undefined!
> > ERROR: "imx_scu_irq_group_enable"
> > [drivers/input/keyboard/imx_sc_key.ko] undefined!
> > make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
> > make: *** [Makefile:1282: modules] Error 2
> >
> > If you want to enable compile test coverage you need to provide stubs
> > for the above functions.
> >
> 
> or select IMX_SCU
> 
> or leave out COMPILE_TEST from the individual drivers as having
> COMPILE_TEST for IMX_SCU is enough to be able to select the drivers.

Thanks, I already added the COMPILE_TEST for IMX_SCU which is in this same patch series,
without that IMX_SCU COMPILE_TEST patch, the build will failed, so in V2, I also added
the stubs into those IMX SCU APIs to make sure even IMX_SCU is NOT enabled, modules
with COMPILE_TEST can still pass build, please help review V2 patch set.

Thanks,
Anson

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

* Re: [PATCH 3/5] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY
  2020-03-07  1:36         ` Anson Huang
@ 2020-03-07  2:57           ` Alexandre Belloni
  2020-03-07  3:33             ` Anson Huang
  0 siblings, 1 reply; 15+ messages in thread
From: Alexandre Belloni @ 2020-03-07  2:57 UTC (permalink / raw)
  To: Anson Huang
  Cc: Dmitry Torokhov, Shawn Guo, Sascha Hauer, Sascha Hauer,
	Fabio Estevam, Alessandro Zummo, Zhang Rui, Daniel Lezcano,
	amit.kucheria, wim, Guenter Roeck, Daniel Baluta, Oleksij Rempel,
	Greg Kroah-Hartman, Thomas Gleixner, Marco Felsch,
	Andy Shevchenko, Arnd Bergmann, Enric Balletbo i Serra,
	Ronald Tschalär, Krzysztof Kozlowski, linux-arm-kernel,
	lkml, linux-input, linux-rtc, Linux PM, LINUXWATCHDOG,
	dl-linux-imx

On 07/03/2020 01:36:39+0000, Anson Huang wrote:
> Hi, Alexandre
> 
> > Subject: Re: [PATCH 3/5] input: keyboard: add COMPILE_TEST support for
> > KEYBOARD_IMX_SC_KEY
> > 
> > On 06/03/2020 12:05:42-0800, Dmitry Torokhov wrote:
> > > On Fri, Mar 6, 2020 at 11:33 AM Dmitry Torokhov
> > > <dmitry.torokhov@gmail.com> wrote:
> > > >
> > > > On Fri, Mar 06, 2020 at 11:42:34PM +0800, Anson Huang wrote:
> > > > > Add COMPILE_TEST support to i.MX SC keyboard driver for better
> > > > > compile testing coverage.
> > > > >
> > > > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > > >
> > > > Applied, thank you.
> > >
> > > Actually, not:
> > >
> > > ERROR: "imx_scu_irq_register_notifier"
> > > [drivers/input/keyboard/imx_sc_key.ko] undefined!
> > > ERROR: "imx_scu_get_handle" [drivers/input/keyboard/imx_sc_key.ko]
> > undefined!
> > > ERROR: "imx_scu_call_rpc" [drivers/input/keyboard/imx_sc_key.ko]
> > undefined!
> > > ERROR: "imx_scu_irq_unregister_notifier"
> > > [drivers/input/keyboard/imx_sc_key.ko] undefined!
> > > ERROR: "imx_scu_irq_group_enable"
> > > [drivers/input/keyboard/imx_sc_key.ko] undefined!
> > > make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
> > > make: *** [Makefile:1282: modules] Error 2
> > >
> > > If you want to enable compile test coverage you need to provide stubs
> > > for the above functions.
> > >
> > 
> > or select IMX_SCU
> > 
> > or leave out COMPILE_TEST from the individual drivers as having
> > COMPILE_TEST for IMX_SCU is enough to be able to select the drivers.
> 
> Thanks, I already added the COMPILE_TEST for IMX_SCU which is in this same patch series,
> without that IMX_SCU COMPILE_TEST patch, the build will failed, so in V2, I also added
> the stubs into those IMX SCU APIs to make sure even IMX_SCU is NOT enabled, modules
> with COMPILE_TEST can still pass build, please help review V2 patch set.
> 

My point is that there is no need for the stubs. Simply have
COMPILE_TEST for IMX_SCU as this is enough to extend coverage to all the
drivers and significantly reduces the code size versus what you did in
v2.


-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* RE: [PATCH 3/5] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY
  2020-03-07  2:57           ` Alexandre Belloni
@ 2020-03-07  3:33             ` Anson Huang
  0 siblings, 0 replies; 15+ messages in thread
From: Anson Huang @ 2020-03-07  3:33 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Dmitry Torokhov, Shawn Guo, Sascha Hauer, Sascha Hauer,
	Fabio Estevam, Alessandro Zummo, Zhang Rui, Daniel Lezcano,
	amit.kucheria, wim, Guenter Roeck, Daniel Baluta, Oleksij Rempel,
	Greg Kroah-Hartman, Thomas Gleixner, Marco Felsch,
	Andy Shevchenko, Arnd Bergmann, Enric Balletbo i Serra,
	Ronald Tschalär, Krzysztof Kozlowski, linux-arm-kernel,
	lkml, linux-input, linux-rtc, Linux PM, LINUXWATCHDOG,
	dl-linux-imx

Hi, Alexandre

> Subject: Re: [PATCH 3/5] input: keyboard: add COMPILE_TEST support for
> KEYBOARD_IMX_SC_KEY
> 
> On 07/03/2020 01:36:39+0000, Anson Huang wrote:
> > Hi, Alexandre
> >
> > > Subject: Re: [PATCH 3/5] input: keyboard: add COMPILE_TEST support
> > > for KEYBOARD_IMX_SC_KEY
> > >
> > > On 06/03/2020 12:05:42-0800, Dmitry Torokhov wrote:
> > > > On Fri, Mar 6, 2020 at 11:33 AM Dmitry Torokhov
> > > > <dmitry.torokhov@gmail.com> wrote:
> > > > >
> > > > > On Fri, Mar 06, 2020 at 11:42:34PM +0800, Anson Huang wrote:
> > > > > > Add COMPILE_TEST support to i.MX SC keyboard driver for better
> > > > > > compile testing coverage.
> > > > > >
> > > > > > Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> > > > >
> > > > > Applied, thank you.
> > > >
> > > > Actually, not:
> > > >
> > > > ERROR: "imx_scu_irq_register_notifier"
> > > > [drivers/input/keyboard/imx_sc_key.ko] undefined!
> > > > ERROR: "imx_scu_get_handle" [drivers/input/keyboard/imx_sc_key.ko]
> > > undefined!
> > > > ERROR: "imx_scu_call_rpc" [drivers/input/keyboard/imx_sc_key.ko]
> > > undefined!
> > > > ERROR: "imx_scu_irq_unregister_notifier"
> > > > [drivers/input/keyboard/imx_sc_key.ko] undefined!
> > > > ERROR: "imx_scu_irq_group_enable"
> > > > [drivers/input/keyboard/imx_sc_key.ko] undefined!
> > > > make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
> > > > make: *** [Makefile:1282: modules] Error 2
> > > >
> > > > If you want to enable compile test coverage you need to provide
> > > > stubs for the above functions.
> > > >
> > >
> > > or select IMX_SCU
> > >
> > > or leave out COMPILE_TEST from the individual drivers as having
> > > COMPILE_TEST for IMX_SCU is enough to be able to select the drivers.
> >
> > Thanks, I already added the COMPILE_TEST for IMX_SCU which is in this
> > same patch series, without that IMX_SCU COMPILE_TEST patch, the build
> > will failed, so in V2, I also added the stubs into those IMX SCU APIs
> > to make sure even IMX_SCU is NOT enabled, modules with COMPILE_TEST
> can still pass build, please help review V2 patch set.
> >
> 
> My point is that there is no need for the stubs. Simply have COMPILE_TEST
> for IMX_SCU as this is enough to extend coverage to all the drivers and
> significantly reduces the code size versus what you did in v2.

OK, then I think V1 patch set is already what you expected, patch 1/5 adds the COMPILE_TEST
for IMX_SCU. I think maintainers can just pick up the V1 patch set.

Thanks,
Anson

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

end of thread, back to index

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-06 15:42 [PATCH 1/5] firmware: imx: add COMPILE_TEST support Anson Huang
2020-03-06 15:42 ` [PATCH 2/5] rtc: add COMPILE_TEST support for i.MX SC RTC Anson Huang
2020-03-06 15:42 ` [PATCH 3/5] input: keyboard: add COMPILE_TEST support for KEYBOARD_IMX_SC_KEY Anson Huang
2020-03-06 19:33   ` Dmitry Torokhov
2020-03-06 20:05     ` Dmitry Torokhov
2020-03-06 21:15       ` Alexandre Belloni
2020-03-07  1:36         ` Anson Huang
2020-03-07  2:57           ` Alexandre Belloni
2020-03-07  3:33             ` Anson Huang
2020-03-07  0:18       ` Anson Huang
2020-03-07  0:51         ` Dmitry Torokhov
2020-03-07  1:01           ` Anson Huang
2020-03-06 15:42 ` [PATCH 4/5] watchdog: add COMPILE_TEST support for IMX_SC_WDT Anson Huang
2020-03-06 15:42 ` [PATCH 5/5] thermal: add COMPILE_TEST support for IMX_SC_THERMAL Anson Huang
2020-03-06 16:38   ` Amit Kucheria

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