linux/arch/arm/mach-mmp
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 ARM: soc: multiplatform enablement 2012-10-01 19:11:38 -07:00
Kconfig ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
Makefile ARM: mmp: move mmp2 clock definition to separated file 2012-09-08 23:38:19 +08:00
Makefile.boot ARM: 7022/1: allow to detect conflicting zreladdrs 2011-10-17 09:12:40 +01:00
aspenite.c ARM: pxa: move platform_data definitions 2012-09-14 11:18:10 +02:00
avengers_lite.c ARM: mmp: remove NR_IRQS 2012-01-25 20:37:48 -06:00
brownstone.c ARM: mmp: remove NR_IRQS 2012-01-25 20:37:48 -06:00
clock-mmp2.c ARM: mmp: move mmp2 clock definition to separated file 2012-09-08 23:38:19 +08:00
clock-pxa168.c arm: mmp: move pxa168 clock definition to separated file 2012-09-08 23:37:16 +08:00
clock-pxa910.c arm: mmp: move pxa910 clock definition to separated file 2012-09-08 23:37:51 +08:00
clock.c ARM: pxa: add clk_set_rate() 2011-07-12 19:45:19 +08:00
clock.h ARM: pxa: use correct __iomem annotations 2011-10-08 21:03:07 +08:00
common.c Disintegrate asm/system.h for ARM 2012-03-28 18:30:01 +01:00
common.h ARM: mmp: move mmp2 clock definition to separated file 2012-09-08 23:38:19 +08:00
devices.c ARM: mmp: add usb host support for PXA168 2012-05-03 15:06:05 +08:00
flint.c ARM: mmp: remove NR_IRQS 2012-01-25 20:37:48 -06:00
gplugd.c ARM: mmp: add missing irqs.h 2012-08-02 10:15:59 -07:00
irq.c ARM: mmp: using for_each_set_bit to simplify the code 2012-09-21 15:57:31 +08:00
jasper.c ARM: mmp: remove NR_IRQS 2012-01-25 20:37:48 -06:00
mmp-dt.c ARM: mmp: support pxa910 with device tree 2012-05-05 16:38:45 +08:00
mmp2-dt.c ARM: mmp: support mmp2 with device tree 2012-05-05 16:37:57 +08:00
mmp2.c ARM: soc: device tree updates 2012-10-01 18:28:06 -07:00
pm-mmp2.c ARM: mmp: add PM support for mmp2 2012-05-07 11:35:00 +08:00
pm-pxa910.c ARM: mmp: add pm support for pxa910 2012-05-07 11:48:37 +08:00
pxa168.c arm: mmp: move pxa168 clock definition to separated file 2012-09-08 23:37:16 +08:00
pxa910.c ARM: soc: device tree updates 2012-10-01 18:28:06 -07:00
sram.c Merge branch 'multiplatform/platform-data' into next/multiplatform 2012-09-22 01:07:21 -07:00
tavorevb.c Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-03-29 16:53:48 -07:00
teton_bga.c ARM: pxa: move platform_data definitions 2012-09-14 11:18:10 +02:00
time.c ARM: mmp: support DT in timer 2012-05-05 16:36:01 +08:00
ttc_dkb.c ARM: ttc_dkb: add nand support 2012-08-03 15:15:58 +08:00