LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] pwm: stm32: enforce dependency on CONFIG_MFD_STM32_TIMERS
@ 2018-05-25 16:04 Arnd Bergmann
  2018-06-06  8:04 ` Thierry Reding
  2018-06-06  8:13 ` Thierry Reding
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2018-05-25 16:04 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Benjamin Gaignard, Arnd Bergmann, linux-pwm, linux-kernel

When compile-testing the pwm driver without also enabling the
stm32_timers MFD, we run into a link error:

drivers/pwm/pwm-stm32.o: In function `stm32_pwm_raw_capture.isra.6':
pwm-stm32.c:(.text+0xcb0): undefined reference to `stm32_timers_dma_burst_read'

We don't need the '|| COMPILE_TEST' here, since stm32_timers itself
can be built with CONFIG_COMPILE_TEST on all architectures, so we do
get the coverage through allmodconfig and randconfig builds even
when we make it a hard dependency.

Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/pwm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index 4635cb35008c..a4d262db9945 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -401,7 +401,7 @@ config PWM_STI
 
 config PWM_STM32
 	tristate "STMicroelectronics STM32 PWM"
-	depends on MFD_STM32_TIMERS || COMPILE_TEST
+	depends on MFD_STM32_TIMERS
 	help
 	  Generic PWM framework driver for STM32 SoCs.
 
-- 
2.9.0

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

* Re: [PATCH] pwm: stm32: enforce dependency on CONFIG_MFD_STM32_TIMERS
  2018-05-25 16:04 [PATCH] pwm: stm32: enforce dependency on CONFIG_MFD_STM32_TIMERS Arnd Bergmann
@ 2018-06-06  8:04 ` Thierry Reding
  2018-06-06  8:13 ` Thierry Reding
  1 sibling, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2018-06-06  8:04 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Benjamin Gaignard, linux-pwm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 821 bytes --]

On Fri, May 25, 2018 at 06:04:54PM +0200, Arnd Bergmann wrote:
> When compile-testing the pwm driver without also enabling the
> stm32_timers MFD, we run into a link error:
> 
> drivers/pwm/pwm-stm32.o: In function `stm32_pwm_raw_capture.isra.6':
> pwm-stm32.c:(.text+0xcb0): undefined reference to `stm32_timers_dma_burst_read'
> 
> We don't need the '|| COMPILE_TEST' here, since stm32_timers itself
> can be built with CONFIG_COMPILE_TEST on all architectures, so we do
> get the coverage through allmodconfig and randconfig builds even
> when we make it a hard dependency.
> 
> Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/pwm/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] pwm: stm32: enforce dependency on CONFIG_MFD_STM32_TIMERS
  2018-05-25 16:04 [PATCH] pwm: stm32: enforce dependency on CONFIG_MFD_STM32_TIMERS Arnd Bergmann
  2018-06-06  8:04 ` Thierry Reding
@ 2018-06-06  8:13 ` Thierry Reding
  2018-06-07  5:08   ` Lee Jones
  1 sibling, 1 reply; 4+ messages in thread
From: Thierry Reding @ 2018-06-06  8:13 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Lee Jones, Benjamin Gaignard, Fabrice Gasnier, linux-pwm, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1105 bytes --]

On Fri, May 25, 2018 at 06:04:54PM +0200, Arnd Bergmann wrote:
> When compile-testing the pwm driver without also enabling the
> stm32_timers MFD, we run into a link error:
> 
> drivers/pwm/pwm-stm32.o: In function `stm32_pwm_raw_capture.isra.6':
> pwm-stm32.c:(.text+0xcb0): undefined reference to `stm32_timers_dma_burst_read'
> 
> We don't need the '|| COMPILE_TEST' here, since stm32_timers itself
> can be built with CONFIG_COMPILE_TEST on all architectures, so we do
> get the coverage through allmodconfig and randconfig builds even
> when we make it a hard dependency.
> 
> Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/pwm/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I think Lee already picked up a patch by Fabrice that fixes this by
adding a dummy implementation, see:

	http://patchwork.ozlabs.org/patch/916435/

I prefer your solution, though, because the dummy is pretty redundant if
we can just make this a hard-dependency and still get the same coverage.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] pwm: stm32: enforce dependency on CONFIG_MFD_STM32_TIMERS
  2018-06-06  8:13 ` Thierry Reding
@ 2018-06-07  5:08   ` Lee Jones
  0 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2018-06-07  5:08 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Arnd Bergmann, Benjamin Gaignard, Fabrice Gasnier, linux-pwm,
	linux-kernel

On Wed, 06 Jun 2018, Thierry Reding wrote:

> On Fri, May 25, 2018 at 06:04:54PM +0200, Arnd Bergmann wrote:
> > When compile-testing the pwm driver without also enabling the
> > stm32_timers MFD, we run into a link error:
> > 
> > drivers/pwm/pwm-stm32.o: In function `stm32_pwm_raw_capture.isra.6':
> > pwm-stm32.c:(.text+0xcb0): undefined reference to `stm32_timers_dma_burst_read'
> > 
> > We don't need the '|| COMPILE_TEST' here, since stm32_timers itself
> > can be built with CONFIG_COMPILE_TEST on all architectures, so we do
> > get the coverage through allmodconfig and randconfig builds even
> > when we make it a hard dependency.
> > 
> > Fixes: 7edf7369205b ("pwm: Add driver for STM32 plaftorm")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > ---
> >  drivers/pwm/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> I think Lee already picked up a patch by Fabrice that fixes this by
> adding a dummy implementation, see:
> 
> 	http://patchwork.ozlabs.org/patch/916435/
> 
> I prefer your solution, though, because the dummy is pretty redundant if
> we can just make this a hard-dependency and still get the same coverage.

The two patches aren't mutually exclusive. :)

-- 
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

end of thread, other threads:[~2018-06-07  5:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-25 16:04 [PATCH] pwm: stm32: enforce dependency on CONFIG_MFD_STM32_TIMERS Arnd Bergmann
2018-06-06  8:04 ` Thierry Reding
2018-06-06  8:13 ` Thierry Reding
2018-06-07  5:08   ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).