Skip to content

Commit

Permalink
ARM: config: sort select statements alphanumerically
Browse files Browse the repository at this point in the history
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 <jason@lakedaemon.net>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Oct 13, 2012
1 parent 4f1cd91 commit b1b3f49
Show file tree
Hide file tree
Showing 39 changed files with 765 additions and 767 deletions.
403 changes: 201 additions & 202 deletions arch/arm/Kconfig

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions arch/arm/common/Kconfig
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
config ARM_GIC
bool
select IRQ_DOMAIN
select MULTI_IRQ_HANDLER
bool

config GIC_NON_BANKED
bool

config ARM_VIC
bool
select IRQ_DOMAIN
select MULTI_IRQ_HANDLER
bool

config ARM_VIC_NR
int
Expand Down
26 changes: 13 additions & 13 deletions arch/arm/mach-at91/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -19,75 +19,75 @@ config AT91_SAM9G45_RESET

config SOC_AT91SAM9
bool
select GENERIC_CLOCKEVENTS
select CPU_ARM926T
select GENERIC_CLOCKEVENTS

menu "Atmel AT91 System-on-Chip"

comment "Atmel AT91 Processor"

config SOC_AT91SAM9
bool
select AT91_SAM9_SMC
select AT91_SAM9_TIME
select CPU_ARM926T
select MULTI_IRQ_HANDLER
select SPARSE_IRQ
select AT91_SAM9_TIME
select AT91_SAM9_SMC

config SOC_AT91RM9200
bool "AT91RM9200"
select CPU_ARM920T
select MULTI_IRQ_HANDLER
select SPARSE_IRQ
select GENERIC_CLOCKEVENTS
select HAVE_AT91_DBGU0
select MULTI_IRQ_HANDLER
select SPARSE_IRQ

config SOC_AT91SAM9260
bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20"
select SOC_AT91SAM9
select HAVE_AT91_DBGU0
select HAVE_NET_MACB
select SOC_AT91SAM9
help
Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE
or AT91SAM9G20 SoC.

config SOC_AT91SAM9261
bool "AT91SAM9261 or AT91SAM9G10"
select SOC_AT91SAM9
select HAVE_AT91_DBGU0
select HAVE_FB_ATMEL
select SOC_AT91SAM9
help
Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC.

config SOC_AT91SAM9263
bool "AT91SAM9263"
select SOC_AT91SAM9
select HAVE_AT91_DBGU1
select HAVE_FB_ATMEL
select HAVE_NET_MACB
select SOC_AT91SAM9

config SOC_AT91SAM9RL
bool "AT91SAM9RL"
select SOC_AT91SAM9
select HAVE_AT91_DBGU0
select HAVE_FB_ATMEL
select SOC_AT91SAM9

config SOC_AT91SAM9G45
bool "AT91SAM9G45 or AT91SAM9M10 families"
select SOC_AT91SAM9
select HAVE_AT91_DBGU1
select HAVE_FB_ATMEL
select HAVE_NET_MACB
select SOC_AT91SAM9
help
Select this if you are using one of Atmel's AT91SAM9G45 family SoC.
This support covers AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11.

config SOC_AT91SAM9X5
bool "AT91SAM9x5 family"
select SOC_AT91SAM9
select HAVE_AT91_DBGU0
select HAVE_FB_ATMEL
select HAVE_NET_MACB
select SOC_AT91SAM9
help
Select this if you are using one of Atmel's AT91SAM9x5 family SoC.
This means that your SAM9 name finishes with a '5' (except if it is
Expand All @@ -97,9 +97,9 @@ config SOC_AT91SAM9X5

config SOC_AT91SAM9N12
bool "AT91SAM9N12 family"
select SOC_AT91SAM9
select HAVE_AT91_DBGU0
select HAVE_FB_ATMEL
select SOC_AT91SAM9
help
Select this if you are using Atmel's AT91SAM9N12 SoC.

Expand Down Expand Up @@ -144,9 +144,9 @@ config ARCH_AT91SAM9G45
config ARCH_AT91X40
bool "AT91x40"
depends on !MMU
select ARCH_USES_GETTIMEOFFSET
select MULTI_IRQ_HANDLER
select SPARSE_IRQ
select ARCH_USES_GETTIMEOFFSET

endchoice

Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-clps711x/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ config ARCH_CLEP7312

config ARCH_EDB7211
bool "EDB7211"
select ISA
select ARCH_SPARSEMEM_ENABLE
select ARCH_SELECT_MEMORY_MODEL
select ARCH_SPARSEMEM_ENABLE
select ISA
help
Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211
evaluation board.
Expand Down
16 changes: 8 additions & 8 deletions arch/arm/mach-davinci/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ config AINTC
bool

config CP_INTC
select IRQ_DOMAIN
bool
select IRQ_DOMAIN

config ARCH_DAVINCI_DMx
select CPU_ARM926T
bool
select CPU_ARM926T

menu "TI DaVinci Implementations"

Expand All @@ -32,29 +32,29 @@ config ARCH_DAVINCI_DM646x

config ARCH_DAVINCI_DA830
bool "DA830/OMAP-L137/AM17x based system"
select CP_INTC
select ARCH_DAVINCI_DA8XX
select CPU_DCACHE_WRITETHROUGH # needed on silicon revs 1.0, 1.1
select CP_INTC

config ARCH_DAVINCI_DA850
bool "DA850/OMAP-L138/AM18x based system"
select CP_INTC
select ARCH_DAVINCI_DA8XX
select ARCH_HAS_CPUFREQ
select CP_INTC

config ARCH_DAVINCI_DA8XX
select CPU_ARM926T
bool
select CPU_ARM926T

config ARCH_DAVINCI_DM365
bool "DaVinci 365 based system"
select AINTC
select ARCH_DAVINCI_DMx

config ARCH_DAVINCI_TNETV107X
bool "TNETV107X based system"
select CPU_V6
select CP_INTC
bool "TNETV107X based system"

comment "DaVinci Board Type"

Expand Down Expand Up @@ -103,9 +103,9 @@ config MACH_DAVINCI_DM6467_EVM
bool "TI DM6467 EVM"
default ARCH_DAVINCI_DM646x
depends on ARCH_DAVINCI_DM646x
select MACH_DAVINCI_DM6467TEVM
select EEPROM_AT24
select I2C
select MACH_DAVINCI_DM6467TEVM
help
Configure this option to specify the whether the board used
for development is a DM6467 EVM
Expand All @@ -127,8 +127,8 @@ config MACH_DAVINCI_DA830_EVM
bool "TI DA830/OMAP-L137/AM17x Reference Platform"
default ARCH_DAVINCI_DA830
depends on ARCH_DAVINCI_DA830
select GPIO_PCF857X
select EEPROM_AT24
select GPIO_PCF857X
select I2C
help
Say Y here to select the TI DA830/OMAP-L137/AM17x Evaluation Module.
Expand Down
Loading

0 comments on commit b1b3f49

Please sign in to comment.