All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] power: reset: reboot mode: fix build error of missing ioremap/iounmap on UM
@ 2016-08-07 13:14 Andy Yan
  2016-08-08  7:25 ` Matthias Brugger
  2016-08-08 16:54 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Yan @ 2016-08-07 13:14 UTC (permalink / raw)
  To: sre
  Cc: richard, matthias.bgg, moritz.fischer, fengguang.wu,
	alexandre.belloni, linux-pm, linux-kernel, dbaryshkov,
	k.kozlowski, dwmw2, nicolas.ferre, Andy Yan

Add missing HAS_IOMEM dependency for MFD_SYSCON to fix the um-allyesconfig
build error:

drivers/mfd/syscon.c: In function 'of_syscon_register':
drivers/mfd/syscon.c:67:9: error: implicit declaration of function 'ioremap' [-Werror=implicit-function-declaration]
  base = ioremap(res.start, resource_size(&res));
         ^
drivers/mfd/syscon.c:67:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  base = ioremap(res.start, resource_size(&res));
       ^
drivers/mfd/syscon.c:109:2: error: implicit declaration of function 'iounmap' [-Werror=implicit-function-declaration]
  iounmap(base);
  ^

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
---

 drivers/power/reset/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
index 7053abc..1388be3 100644
--- a/drivers/power/reset/Kconfig
+++ b/drivers/power/reset/Kconfig
@@ -190,6 +190,7 @@ config REBOOT_MODE
 config SYSCON_REBOOT_MODE
 	tristate "Generic SYSCON regmap reboot mode driver"
 	depends on OF
+	depends on HAS_IOMEM
 	select REBOOT_MODE
 	select MFD_SYSCON
 	help
-- 
2.7.4

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

* Re: [PATCH] power: reset: reboot mode: fix build error of missing ioremap/iounmap on UM
  2016-08-07 13:14 [PATCH] power: reset: reboot mode: fix build error of missing ioremap/iounmap on UM Andy Yan
@ 2016-08-08  7:25 ` Matthias Brugger
  2016-08-08 16:54 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 3+ messages in thread
From: Matthias Brugger @ 2016-08-08  7:25 UTC (permalink / raw)
  To: Andy Yan, sre
  Cc: richard, moritz.fischer, fengguang.wu, alexandre.belloni,
	linux-pm, linux-kernel, dbaryshkov, k.kozlowski, dwmw2,
	nicolas.ferre



On August 7, 2016 3:14:21 PM CEST, Andy Yan <andy.yan@rock-chips.com> wrote:
>Add missing HAS_IOMEM dependency for MFD_SYSCON to fix the
>um-allyesconfig
>build error:
>
>drivers/mfd/syscon.c: In function 'of_syscon_register':
>drivers/mfd/syscon.c:67:9: error: implicit declaration of function
>'ioremap' [-Werror=implicit-function-declaration]
>  base = ioremap(res.start, resource_size(&res));
>         ^
>drivers/mfd/syscon.c:67:7: warning: assignment makes pointer from
>integer without a cast [-Wint-conversion]
>  base = ioremap(res.start, resource_size(&res));
>       ^
>drivers/mfd/syscon.c:109:2: error: implicit declaration of function
>'iounmap' [-Werror=implicit-function-declaration]
>  iounmap(base);
>  ^
>
>Signed-off-by: Andy Yan <andy.yan@rock-chips.com>

Normally when sending a fix you specify:
commit sha ("commit subject")

regards,
Matthias

>---
>
> drivers/power/reset/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
>diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
>index 7053abc..1388be3 100644
>--- a/drivers/power/reset/Kconfig
>+++ b/drivers/power/reset/Kconfig
>@@ -190,6 +190,7 @@ config REBOOT_MODE
> config SYSCON_REBOOT_MODE
> 	tristate "Generic SYSCON regmap reboot mode driver"
> 	depends on OF
>+	depends on HAS_IOMEM
> 	select REBOOT_MODE
> 	select MFD_SYSCON
> 	help

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

* Re: [PATCH] power: reset: reboot mode: fix build error of missing ioremap/iounmap on UM
  2016-08-07 13:14 [PATCH] power: reset: reboot mode: fix build error of missing ioremap/iounmap on UM Andy Yan
  2016-08-08  7:25 ` Matthias Brugger
@ 2016-08-08 16:54 ` Krzysztof Kozlowski
  1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2016-08-08 16:54 UTC (permalink / raw)
  To: Andy Yan
  Cc: sre, richard, matthias.bgg, moritz.fischer, fengguang.wu,
	alexandre.belloni, linux-pm, linux-kernel, dbaryshkov,
	k.kozlowski, dwmw2, nicolas.ferre

On Sun, Aug 07, 2016 at 09:14:21PM +0800, Andy Yan wrote:
> Add missing HAS_IOMEM dependency for MFD_SYSCON to fix the um-allyesconfig
> build error:
> 
> drivers/mfd/syscon.c: In function 'of_syscon_register':
> drivers/mfd/syscon.c:67:9: error: implicit declaration of function 'ioremap' [-Werror=implicit-function-declaration]
>   base = ioremap(res.start, resource_size(&res));
>          ^
> drivers/mfd/syscon.c:67:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
>   base = ioremap(res.start, resource_size(&res));
>        ^
> drivers/mfd/syscon.c:109:2: error: implicit declaration of function 'iounmap' [-Werror=implicit-function-declaration]
>   iounmap(base);
>   ^
> 
> Signed-off-by: Andy Yan <andy.yan@rock-chips.com>

Missing credits for reported by.

That does not look proper... The driver itself is not using ioremap.
Error is triggered by selecting MFD_SYSCON... Some time ago I sent a
bulk of similar fixes for stuff like this but there were some comments
against. Finally the fixes were merged but ultimately the COMPILE_TEST
was changed to !UM. Here it happens even without COMPILE_TEST... Maybe
it should just depend on MFD_SYSCON?

Best regards,
Krzysztof


> ---
> 
>  drivers/power/reset/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
> index 7053abc..1388be3 100644
> --- a/drivers/power/reset/Kconfig
> +++ b/drivers/power/reset/Kconfig
> @@ -190,6 +190,7 @@ config REBOOT_MODE
>  config SYSCON_REBOOT_MODE
>  	tristate "Generic SYSCON regmap reboot mode driver"
>  	depends on OF
> +	depends on HAS_IOMEM
>  	select REBOOT_MODE
>  	select MFD_SYSCON
>  	help
> -- 
> 2.7.4
> 
> 

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

end of thread, other threads:[~2016-08-08 16:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-07 13:14 [PATCH] power: reset: reboot mode: fix build error of missing ioremap/iounmap on UM Andy Yan
2016-08-08  7:25 ` Matthias Brugger
2016-08-08 16:54 ` Krzysztof Kozlowski

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.