From b1b3f49ce4606452279b58b17f2bbe2ba00304b7 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sat, 6 Oct 2012 17:12:25 +0100 Subject: ARM: config: sort select statements alphanumerically As suggested by Andrew Morton: This is a pet peeve of mine. Any time there's a long list of items (header file inclusions, kconfig entries, array initalisers, etc) and someone wants to add a new item, they *always* go and stick it at the end of the list. Guys, don't do this. Either put the new item into a randomly-chosen position or, probably better, alphanumerically sort the list. lets sort all our select statements alphanumerically. This commit was created by the following perl: while (<>) { while (/\\\s*$/) { $_ .= <>; } undef %selects if /^\s*config\s+/; if (/^\s+select\s+(\w+).*/) { if (defined($selects{$1})) { if ($selects{$1} eq $_) { print STDERR "Warning: removing duplicated $1 entry\n"; } else { print STDERR "Error: $1 differently selected\n". "\tOld: $selects{$1}\n". "\tNew: $_\n"; exit 1; } } $selects{$1} = $_; next; } if (%selects and (/^\s*$/ or /^\s+help/ or /^\s+---help---/ or /^endif/ or /^endchoice/)) { foreach $k (sort (keys %selects)) { print "$selects{$k}"; } undef %selects; } print; } if (%selects) { foreach $k (sort (keys %selects)) { print "$selects{$k}"; } } It found two duplicates: Warning: removing duplicated S5P_SETUP_MIPIPHY entry Warning: removing duplicated HARDIRQS_SW_RESEND entry and they are identical duplicates, hence the shrinkage in the diffstat of two lines. We have four testers reporting success of this change (Tony, Stephen, Linus and Sekhar.) Acked-by: Jason Cooper Acked-by: Tony Lindgren Acked-by: Stephen Warren Acked-by: Linus Walleij Acked-by: Sekhar Nori Signed-off-by: Russell King --- arch/arm/mach-msm/Kconfig | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'arch/arm/mach-msm/Kconfig') diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index 7902de151cc5..b61908594b47 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig @@ -10,35 +10,35 @@ choice config ARCH_MSM7X00A bool "MSM7x00A / MSM7x01A" - select MACH_TROUT if !MACH_HALIBUT select ARCH_MSM_ARM11 - select MSM_SMD - select MSM_SMD_PKG3 select CPU_V6 select GPIO_MSM_V1 + select MACH_TROUT if !MACH_HALIBUT select MSM_PROC_COMM + select MSM_SMD + select MSM_SMD_PKG3 config ARCH_MSM7X30 bool "MSM7x30" - select MACH_MSM7X30_SURF # if ! select ARCH_MSM_SCORPION - select MSM_SMD - select MSM_VIC select CPU_V7 - select MSM_GPIOMUX select GPIO_MSM_V1 + select MACH_MSM7X30_SURF # if ! + select MSM_GPIOMUX select MSM_PROC_COMM + select MSM_SMD + select MSM_VIC config ARCH_QSD8X50 bool "QSD8X50" - select MACH_QSD8X50_SURF if !MACH_QSD8X50A_ST1_5 select ARCH_MSM_SCORPION - select MSM_SMD - select MSM_VIC select CPU_V7 - select MSM_GPIOMUX select GPIO_MSM_V1 + select MACH_QSD8X50_SURF if !MACH_QSD8X50A_ST1_5 + select MSM_GPIOMUX select MSM_PROC_COMM + select MSM_SMD + select MSM_VIC endchoice @@ -47,10 +47,10 @@ config ARCH_MSM8X60 select ARCH_MSM_SCORPIONMP select ARM_GIC select CPU_V7 - select MSM_V2_TLMM select GPIO_MSM_V2 select MSM_GPIOMUX select MSM_SCM if SMP + select MSM_V2_TLMM select USE_OF config ARCH_MSM8960 @@ -58,9 +58,9 @@ config ARCH_MSM8960 select ARCH_MSM_SCORPIONMP select ARM_GIC select CPU_V7 - select MSM_V2_TLMM select MSM_GPIOMUX select MSM_SCM if SMP + select MSM_V2_TLMM select USE_OF config MSM_HAS_DEBUG_UART_HS @@ -110,8 +110,8 @@ config MACH_QSD8X50_SURF config MACH_QSD8X50A_ST1_5 depends on ARCH_QSD8X50 - select MSM_SOC_REV_A bool "QSD8x50A ST1.5" + select MSM_SOC_REV_A help Support for the Qualcomm ST1.5. -- cgit v1.2.3