aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-10-07 15:59:01 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2011-11-01 16:52:05 -0500
commite589728b6fffaa74f8d535dab5ad65700dc606bb (patch)
tree3fda87d7dd9a793fec66d6dc7edab05bbff42d42 /scripts/checkpatch.pl
parentfa39a30fe4b92adb77178f388947da922d41648d (diff)
checkpatch: remove rule on non-indented labels
There are 508 non-indented (non-default) labels, and 511 that are indented. So the rule is debatable at least. Actually, in the common case of labels at the outermost scope, there is really just one place where to put the label, so the rule is just wrong IMHO. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl6
1 files changed, 0 insertions, 6 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 0eba357cc..7a71324f6 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2206,12 +2206,6 @@ sub process {
ERROR("space prohibited before that close parenthesis ')'\n" . $herecurr);
}
-#goto labels aren't indented, allow a single space however
- if ($line=~/^.\s+[A-Za-z\d_]+:(?![0-9]+)/ and
- !($line=~/^. [A-Za-z\d_]+:/) and !($line=~/^.\s+default:/)) {
- WARN("labels should not be indented\n" . $herecurr);
- }
-
# Return is not a function.
if (defined($stat) && $stat =~ /^.\s*return(\s*)(\(.*);/s) {
my $spacing = $1;