From e324654294907a420ab3773efe8849a935f37bf0 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 16 Nov 2015 12:06:10 +0900 Subject: ARM: use "depends on" for SoC configs instead of "if" after prompt Many ARM sub-architectures use prompts followed by "if" conditional, but it is wrong. Please notice the difference between config ARCH_FOO bool "Foo SoCs" if ARCH_MULTI_V7 and config ARCH_FOO bool "Foo SoCs" depends on ARCH_MULTI_V7 These two are *not* equivalent! In the former statement, it is not ARCH_FOO, but its prompt that depends on ARCH_MULTI_V7. So, it is completely valid that ARCH_FOO is selected by another, but ARCH_MULTI_V7 is still disabled. As it is not unmet dependency, Kconfig never warns. This is probably not what you want. The former should be used only when you need to do so, and you really understand what you are doing. (In most cases, it should be wrong!) For enabling/disabling sub-architectures, the latter is always correct. As a good side effect, this commit fixes some entries over 80 columns (mach-imx, mach-integrator, mach-mbevu). [Arnd: I note that there is not really a bug here, according to the discussion that followed, but I can see value in being consistent and in making the lines shorter] Signed-off-by: Masahiro Yamada Acked-by: Maxime Ripard Acked-by: Nicolas Ferre Acked-by: Heiko Stuebner Acked-by: Patrice Chotard Acked-by: Liviu Dudau Acked-by: Krzysztof Kozlowski Acked-by: Jun Nie Acked-by: Matthias Brugger Acked-by: Simon Horman Acked-by: Gregory CLEMENT Acked-by: Shawn Guo Acked-by: Sebastian Hesselbarth Acked-by: Thierry Reding Acked-by: Krzysztof Halasa Acked-by: Maxime Coquelin Signed-off-by: Arnd Bergmann --- arch/arm/mach-at91/Kconfig | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'arch/arm/mach-at91') diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig index 92673006e55c..8649f033e2bf 100644 --- a/arch/arm/mach-at91/Kconfig +++ b/arch/arm/mach-at91/Kconfig @@ -9,7 +9,8 @@ menuconfig ARCH_AT91 if ARCH_AT91 config SOC_SAMA5D2 - bool "SAMA5D2 family" if ARCH_MULTI_V7 + bool "SAMA5D2 family" + depends on ARCH_MULTI_V7 select SOC_SAMA5 select CACHE_L2X0 select HAVE_FB_ATMEL @@ -21,7 +22,8 @@ config SOC_SAMA5D2 Select this if ou are using one of Atmel's SAMA5D2 family SoC. config SOC_SAMA5D3 - bool "SAMA5D3 family" if ARCH_MULTI_V7 + bool "SAMA5D3 family" + depends on ARCH_MULTI_V7 select SOC_SAMA5 select HAVE_FB_ATMEL select HAVE_AT91_UTMI @@ -32,7 +34,8 @@ config SOC_SAMA5D3 This support covers SAMA5D31, SAMA5D33, SAMA5D34, SAMA5D35, SAMA5D36. config SOC_SAMA5D4 - bool "SAMA5D4 family" if ARCH_MULTI_V7 + bool "SAMA5D4 family" + depends on ARCH_MULTI_V7 select SOC_SAMA5 select CACHE_L2X0 select HAVE_FB_ATMEL @@ -44,7 +47,8 @@ config SOC_SAMA5D4 Select this if you are using one of Atmel's SAMA5D4 family SoC. config SOC_AT91RM9200 - bool "AT91RM9200" if ARCH_MULTI_V4T + bool "AT91RM9200" + depends on ARCH_MULTI_V4T select ATMEL_AIC_IRQ select ATMEL_ST select CPU_ARM920T @@ -56,7 +60,8 @@ config SOC_AT91RM9200 Select this if you are using Atmel's AT91RM9200 SoC. config SOC_AT91SAM9 - bool "AT91SAM9" if ARCH_MULTI_V5 + bool "AT91SAM9" + depends on ARCH_MULTI_V5 select ATMEL_AIC_IRQ select ATMEL_SDRAMC select CPU_ARM926T -- cgit v1.2.3