linux/arch/arm/mach-imx
Russell King b1b3f49ce4 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 <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>
2012-10-13 17:11:28 +01:00
..
include/mach
clk-busy.c
clk-gate2.c
clk-imx1.c
clk-imx6q.c
clk-imx21.c
clk-imx25.c
clk-imx27.c
clk-imx31.c
clk-imx35.c
clk-imx51-imx53.c UAPI Disintegration 2012-10-09 2012-10-09 15:04:25 +01:00
clk-pfd.c
clk-pllv1.c
clk-pllv2.c
clk-pllv3.c
clk.c
clk.h
cpu-imx5.c
cpu-imx25.c
cpu-imx27.c
cpu-imx31.c
cpu-imx35.c
cpu_op-mx51.c
cpu_op-mx51.h
crm-regs-imx5.h
crmregs-imx3.h
devices-imx1.h
devices-imx21.h
devices-imx25.h
devices-imx27.h
devices-imx31.h
devices-imx35.h
devices-imx50.h
devices-imx51.h
ehci-imx5.c
ehci-imx25.c
ehci-imx27.c
ehci-imx31.c
ehci-imx35.c
eukrea_mbimx27-baseboard.c
eukrea_mbimxsd25-baseboard.c
eukrea_mbimxsd35-baseboard.c
eukrea_mbimxsd51-baseboard.c
gpc.c
headsmp.S
hotplug.c
imx27-dt.c
imx31-dt.c
imx51-dt.c
iomux-imx31.c
Kconfig ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
lluart.c
mach-apf9328.c
mach-armadillo5x0.c
mach-bug.c
mach-cpuimx27.c
mach-cpuimx35.c
mach-cpuimx51sd.c
mach-eukrea_cpuimx25.c
mach-imx6q.c
mach-imx27_visstrim_m10.c Sound updates for 3.7-rc1 2012-10-09 07:07:14 +09:00
mach-imx27ipcam.c
mach-imx27lite.c
mach-imx53.c
mach-kzm_arm11_01.c
mach-mx1ads.c
mach-mx21ads.c
mach-mx25_3ds.c
mach-mx27_3ds.c
mach-mx27ads.c
mach-mx31_3ds.c
mach-mx31ads.c
mach-mx31lilly.c
mach-mx31lite.c
mach-mx31moboard.c
mach-mx35_3ds.c
mach-mx50_rdp.c
mach-mx51_3ds.c
mach-mx51_babbage.c
mach-mxt_td60.c
mach-pca100.c
mach-pcm037.c
mach-pcm037_eet.c
mach-pcm038.c
mach-pcm043.c
mach-qong.c
mach-scb9328.c
mach-vpr200.c
Makefile
Makefile.boot
mm-imx1.c
mm-imx3.c
mm-imx5.c
mm-imx21.c
mm-imx25.c
mm-imx27.c
mmdc.c
mx1-camera-fiq-ksym.c
mx1-camera-fiq.S
mx31lilly-db.c
mx31lite-db.c
mx31moboard-devboard.c
mx31moboard-marxbot.c
mx31moboard-smartbot.c
pcm037.h
pcm970-baseboard.c
platsmp.c
pm-imx3.c
pm-imx5.c
pm-imx6q.c
pm-imx27.c
src.c