From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLMhH-0001Zr-DL for qemu-devel@nongnu.org; Tue, 01 Nov 2011 18:20:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RLMhF-0000OL-Uy for qemu-devel@nongnu.org; Tue, 01 Nov 2011 18:20:43 -0400 Received: from mail-gy0-f173.google.com ([209.85.160.173]:47879) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RLMhF-0000OF-PX for qemu-devel@nongnu.org; Tue, 01 Nov 2011 18:20:41 -0400 Received: by gya6 with SMTP id 6so4127141gya.4 for ; Tue, 01 Nov 2011 15:20:41 -0700 (PDT) Message-ID: <4EB070B6.7020708@codemonkey.ws> Date: Tue, 01 Nov 2011 17:20:38 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1317995941-26266-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1317995941-26266-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] checkpatch: remove rule on non-indented labels List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org 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 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;