qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] checkpatch: remove rule on non-indented labels


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] checkpatch: remove rule on non-indented labels
Date: Tue, 01 Nov 2011 17:20:38 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13

On 10/07/2011 08:59 AM, Paolo Bonzini wrote:
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<address@hidden>

Applied.  Thanks.

Regards,

Anthony Liguori

---
  scripts/checkpatch.pl |    6 ------
  1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 0eba357..7a71324 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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]