All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] checkpatch: remove rule on non-indented labels
Date: Tue, 01 Nov 2011 17:20:38 -0500	[thread overview]
Message-ID: <4EB070B6.7020708@codemonkey.ws> (raw)
In-Reply-To: <1317995941-26266-1-git-send-email-pbonzini@redhat.com>

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<pbonzini@redhat.com>

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;

      parent reply	other threads:[~2011-11-01 22:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-07 13:59 [Qemu-devel] [PATCH] checkpatch: remove rule on non-indented labels Paolo Bonzini
2011-10-07 14:43 ` Peter Maydell
2011-11-01 22:20 ` Anthony Liguori [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EB070B6.7020708@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.