openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pinctrl: aspeed: fix unmet dependencies on MFD_SYSCON for PINCTRL_ASPEED
@ 2021-10-29 21:21 Julian Braha
  2021-11-02 22:46 ` Andrew Jeffery
  0 siblings, 1 reply; 2+ messages in thread
From: Julian Braha @ 2021-10-29 21:21 UTC (permalink / raw)
  To: andrew, linus.walleij, joel
  Cc: linux-aspeed, openbmc, linux-kernel, linux-gpio, fazilyildiran,
	linux-arm-kernel

When PINCTRL_ASPEED_G* is selected,
and MFD_SYSCON is not selected,
Kbuild gives the following warnings:

WARNING: unmet direct dependencies detected for PINCTRL_ASPEED
  Depends on [n]: PINCTRL [=y] && (ARCH_ASPEED [=n] || COMPILE_TEST [=y]) && OF [=y] && MFD_SYSCON [=n]
  Selected by [y]:
  - PINCTRL_ASPEED_G4 [=y] && PINCTRL [=y] && (MACH_ASPEED_G4 [=n] || COMPILE_TEST [=y]) && OF [=y]

WARNING: unmet direct dependencies detected for PINCTRL_ASPEED
  Depends on [n]: PINCTRL [=y] && (ARCH_ASPEED [=n] || COMPILE_TEST [=y]) && OF [=y] && MFD_S>
  Selected by [y]:
  - PINCTRL_ASPEED_G5 [=y] && PINCTRL [=y] && (MACH_ASPEED_G5 [=n] || COMPILE_TEST [=y]) && O>

WARNING: unmet direct dependencies detected for PINCTRL_ASPEED
  Depends on [n]: PINCTRL [=y] && (ARCH_ASPEED [=n] || COMPILE_TEST [=y]) && OF [=y] && MFD_S>
  Selected by [y]:
  - PINCTRL_ASPEED_G6 [=y] && PINCTRL [=y] && (MACH_ASPEED_G6 [=n] || COMPILE_TEST [=y]) && O>

This is because PINCTRL_ASPEED_G* selects PINCTRL_ASPEED,
without selecting or depending on MFD_SYSCON, despite
PINCTRL_ASPEED depending on MFD_SYSCON.

These unmet dependency bugs were detected by Kismet,
a static analysis tool for Kconfig. Please advise
if this is not the appropriate solution.

Signed-off-by: Julian Braha <julianbraha@gmail.com>
---
 drivers/pinctrl/aspeed/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/pinctrl/aspeed/Kconfig b/drivers/pinctrl/aspeed/Kconfig
index de8b185c4fee..b0bae6144fc2 100644
--- a/drivers/pinctrl/aspeed/Kconfig
+++ b/drivers/pinctrl/aspeed/Kconfig
@@ -11,6 +11,7 @@ config PINCTRL_ASPEED
 config PINCTRL_ASPEED_G4
 	bool "Aspeed G4 SoC pin control"
 	depends on (MACH_ASPEED_G4 || COMPILE_TEST) && OF
+	depends on MFD_SYSCON
 	select PINCTRL_ASPEED
 	help
 	  Say Y here to enable pin controller support for Aspeed's 4th
@@ -19,6 +20,7 @@ config PINCTRL_ASPEED_G4
 config PINCTRL_ASPEED_G5
 	bool "Aspeed G5 SoC pin control"
 	depends on (MACH_ASPEED_G5 || COMPILE_TEST) && OF
+	depends on MFD_SYSCON
 	select PINCTRL_ASPEED
 	help
 	  Say Y here to enable pin controller support for Aspeed's 5th
@@ -27,6 +29,7 @@ config PINCTRL_ASPEED_G5
 config PINCTRL_ASPEED_G6
 	bool "Aspeed G6 SoC pin control"
 	depends on (MACH_ASPEED_G6 || COMPILE_TEST) && OF
+	depends on MFD_SYSCON
 	select PINCTRL_ASPEED
 	help
 	  Say Y here to enable pin controller support for Aspeed's 6th
-- 
2.30.2


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

* Re: [PATCH] pinctrl: aspeed: fix unmet dependencies on MFD_SYSCON for PINCTRL_ASPEED
  2021-10-29 21:21 [PATCH] pinctrl: aspeed: fix unmet dependencies on MFD_SYSCON for PINCTRL_ASPEED Julian Braha
@ 2021-11-02 22:46 ` Andrew Jeffery
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Jeffery @ 2021-11-02 22:46 UTC (permalink / raw)
  To: Julian Braha, Linus Walleij, Joel Stanley
  Cc: linux-aspeed, openbmc, linux-kernel, linux-gpio, fazilyildiran,
	linux-arm-kernel



On Sat, 30 Oct 2021, at 07:51, Julian Braha wrote:
> When PINCTRL_ASPEED_G* is selected,
> and MFD_SYSCON is not selected,
> Kbuild gives the following warnings:
>
> WARNING: unmet direct dependencies detected for PINCTRL_ASPEED
>   Depends on [n]: PINCTRL [=y] && (ARCH_ASPEED [=n] || COMPILE_TEST 
> [=y]) && OF [=y] && MFD_SYSCON [=n]
>   Selected by [y]:
>   - PINCTRL_ASPEED_G4 [=y] && PINCTRL [=y] && (MACH_ASPEED_G4 [=n] || 
> COMPILE_TEST [=y]) && OF [=y]
>
> WARNING: unmet direct dependencies detected for PINCTRL_ASPEED
>   Depends on [n]: PINCTRL [=y] && (ARCH_ASPEED [=n] || COMPILE_TEST 
> [=y]) && OF [=y] && MFD_S>
>   Selected by [y]:
>   - PINCTRL_ASPEED_G5 [=y] && PINCTRL [=y] && (MACH_ASPEED_G5 [=n] || 
> COMPILE_TEST [=y]) && O>
>
> WARNING: unmet direct dependencies detected for PINCTRL_ASPEED
>   Depends on [n]: PINCTRL [=y] && (ARCH_ASPEED [=n] || COMPILE_TEST 
> [=y]) && OF [=y] && MFD_S>
>   Selected by [y]:
>   - PINCTRL_ASPEED_G6 [=y] && PINCTRL [=y] && (MACH_ASPEED_G6 [=n] || 
> COMPILE_TEST [=y]) && O>
>
> This is because PINCTRL_ASPEED_G* selects PINCTRL_ASPEED,
> without selecting or depending on MFD_SYSCON, despite
> PINCTRL_ASPEED depending on MFD_SYSCON.
>
> These unmet dependency bugs were detected by Kismet,
> a static analysis tool for Kconfig. Please advise
> if this is not the appropriate solution.
>
> Signed-off-by: Julian Braha <julianbraha@gmail.com>

From a system-level perspective MFD_SYSCON is selected by ARCH_ASPEED, 
then the MACH_ASPEED_G* symbols depend on ARCH_ASPEED.

However, that doesn't help the COMPILE_TEST case, so we need some 
solution. Since MFD_SYSCON is required by all the relevant drivers and 
the aspeed pinctrl core, maybe it would be best just to add as a select to 
PINCTRL_ASPEED? Unless there's an argument for depends instead?

Thanks for the patch and report!

Andrew

> ---
>  drivers/pinctrl/aspeed/Kconfig | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/pinctrl/aspeed/Kconfig b/drivers/pinctrl/aspeed/Kconfig
> index de8b185c4fee..b0bae6144fc2 100644
> --- a/drivers/pinctrl/aspeed/Kconfig
> +++ b/drivers/pinctrl/aspeed/Kconfig
> @@ -11,6 +11,7 @@ config PINCTRL_ASPEED
>  config PINCTRL_ASPEED_G4
>  	bool "Aspeed G4 SoC pin control"
>  	depends on (MACH_ASPEED_G4 || COMPILE_TEST) && OF
> +	depends on MFD_SYSCON
>  	select PINCTRL_ASPEED
>  	help
>  	  Say Y here to enable pin controller support for Aspeed's 4th
> @@ -19,6 +20,7 @@ config PINCTRL_ASPEED_G4
>  config PINCTRL_ASPEED_G5
>  	bool "Aspeed G5 SoC pin control"
>  	depends on (MACH_ASPEED_G5 || COMPILE_TEST) && OF
> +	depends on MFD_SYSCON
>  	select PINCTRL_ASPEED
>  	help
>  	  Say Y here to enable pin controller support for Aspeed's 5th
> @@ -27,6 +29,7 @@ config PINCTRL_ASPEED_G5
>  config PINCTRL_ASPEED_G6
>  	bool "Aspeed G6 SoC pin control"
>  	depends on (MACH_ASPEED_G6 || COMPILE_TEST) && OF
> +	depends on MFD_SYSCON
>  	select PINCTRL_ASPEED
>  	help
>  	  Say Y here to enable pin controller support for Aspeed's 6th
> -- 
> 2.30.2

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

end of thread, other threads:[~2021-11-02 22:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 21:21 [PATCH] pinctrl: aspeed: fix unmet dependencies on MFD_SYSCON for PINCTRL_ASPEED Julian Braha
2021-11-02 22:46 ` Andrew Jeffery

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).