diff options
author | Joe Perches <joe@perches.com> | 2011-04-10 14:31:34 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-25 16:58:35 -0700 |
commit | 273f4bef1847ef69f30d7e55f8de876a92639f17 (patch) | |
tree | c70e02b2f823a2ece3b4ac4433ee3a648fa70849 /drivers/staging/westbridge/astoria | |
parent | b0b0fb0fd519c7597d6bf4de7be660788cf2232c (diff) |
staging: Remove unnecessary semicolons when for (foo) {...};
Done via perl script:
$ cat remove_semi_for.pl
my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/;
my $match_balanced_braces = qr/(\{(?:[^\{\}]++|(?-1))*\})/;
foreach my $file (@ARGV) {
my $f;
my $text;
my $oldtext;
next if ((-d $file));
open($f, '<', $file)
or die "$P: Can't open $file for read\n";
$oldtext = do { local($/) ; <$f> };
close($f);
next if ($oldtext eq "");
$text = $oldtext;
my $count = 0;
do {
$count = 0;
$count += $text =~ s@\b(for\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx;
} while ($count > 0);
if ($text ne $oldtext) {
my $newfile = $file;
open($f, '>', $newfile)
or die "$P: Can't open $newfile for write\n";
print $f $text;
close($f);
}
}
$
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/westbridge/astoria')
-rw-r--r-- | drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c b/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c index 3bcedce13f4a..dd4cd412aeb5 100644 --- a/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c +++ b/drivers/staging/westbridge/astoria/arch/arm/mach-omap2/cyashalomap_kernel.c @@ -768,7 +768,7 @@ uint32_t cy_as_hal_processor_hw_init(void) cy_as_hal_print_message(KERN_INFO "%s virt_addr=%x\n", gpio_vma_tab[i].name, (u32)gpio_vma_tab[i].virt_addr); - }; + } /* * force OMAP_GPIO_126 to rleased state, |