summaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/hv_util.c
diff options
context:
space:
mode:
authorJoe Perches2011-04-10 23:31:35 +0200
committerGreg Kroah-Hartman2011-04-26 01:58:35 +0200
commit95cd17c9f3734091a5811fabbd778e3f7b1f0789 (patch)
tree3c45e4755a8d889cd9dbb4a0852d28605a4bb5b2 /drivers/staging/hv/hv_util.c
parentstaging: Remove unnecessary semicolons when for (foo) {...}; (diff)
downloadkernel-qcow2-linux-95cd17c9f3734091a5811fabbd778e3f7b1f0789.tar.gz
kernel-qcow2-linux-95cd17c9f3734091a5811fabbd778e3f7b1f0789.tar.xz
kernel-qcow2-linux-95cd17c9f3734091a5811fabbd778e3f7b1f0789.zip
staging: Remove unnecessary semicolons when switch (foo) {...};
Done via perl script: $ cat remove_semi_switch.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(switch\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/hv/hv_util.c')
-rw-r--r--drivers/staging/hv/hv_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/hv/hv_util.c b/drivers/staging/hv/hv_util.c
index 8038589e2c05..ea76ddaa5fcd 100644
--- a/drivers/staging/hv/hv_util.c
+++ b/drivers/staging/hv/hv_util.c
@@ -88,7 +88,7 @@ static void shutdown_onchannelcallback(void *context)
pr_info("Shutdown request received -"
" Invalid request\n");
break;
- };
+ }
}
icmsghdrp->icflags = ICMSGHDRFLAG_TRANSACTION