2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-29 15:43:59 +08:00
linux-next/arch/arm/plat-mxc
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
..
devices ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
include/mach Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-10-07 17:49:05 +09:00
3ds_debugboard.c ARM: imx: add a legacy irqdomain for 3ds_debugboard 2012-07-01 21:58:15 +08:00
avic.c ARM: imx: Fix build error due to missing irqs.h include 2012-07-04 11:19:40 +08:00
cpu.c ARM: mx3: Setup AIPS registers 2012-03-02 08:49:37 +01:00
cpufreq.c ARM: i.MX remove last leftovers from legacy clock support 2012-09-12 11:46:51 +02:00
cpuidle.c ARM: imx: Add common imx cpuidle init functionality. 2012-06-05 08:51:47 +02:00
devices.c Merge branch 'next/cleanup' of git://git.linaro.org/people/arnd/arm-soc 2011-11-01 20:11:00 -07:00
epit.c ARM i.MX: remove now unnecessary argument from mxc_timer_init 2012-05-16 12:46:09 +02:00
iomux-v1.c ARM: mxc: iomux-v1: Fix build warning 2011-07-07 09:07:33 +02:00
iomux-v3.c MXC IOMUX-V3 replace struct pad_desc with bitmapped cookie (step 2) 2010-12-15 12:42:49 +01:00
iram_alloc.c ARM: imx: Add iram allocator functions 2010-10-19 18:44:57 +02:00
irq-common.c ARM i.MX avic: convert to use generic irq chip 2011-09-23 08:32:14 +02:00
irq-common.h ARM i.MX avic: convert to use generic irq chip 2011-09-23 08:32:14 +02:00
Kconfig ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
Makefile ARM: i.MX remove last leftovers from legacy clock support 2012-09-12 11:46:51 +02:00
ssi-fiq-ksym.c ARM: imx: move platform_data definitions 2012-09-14 11:17:21 +02:00
ssi-fiq.S ARM: mxc: ssi-fiq: Make ssi-fiq.S Thumb-2 compatible 2012-08-13 21:33:14 +02:00
system.c ARM: plat-mxc: Remove unused imx_ioremap 2012-08-10 21:18:48 +02:00
time.c ARM: imx: add missing item to the list of clock event modes 2012-07-16 23:19:58 +02:00
tzic.c ARM: mxc: Include missing irqs.h header 2012-07-28 14:26:57 -07:00
ulpi.c usb: otg: ulpi: Start using struct usb_otg 2012-02-13 13:35:56 +02:00