All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>,
	linux-kernel@vger.kernel.org
Cc: apw@canonical.com
Subject: Re: [PATCH] checkpatch: avoid false positive closing bracket with initializers
Date: Mon, 23 Oct 2017 15:18:49 -0700	[thread overview]
Message-ID: <1508797129.1955.5.camel@perches.com> (raw)
In-Reply-To: <20171023130605.65076-1-carenas@gmail.com>

On Mon, 2017-10-23 at 06:06 -0700, Carlo Marcelo Arenas Belón wrote:
> when multiple closing brackets are being used for an universal zero
> intializer as in (for example):
> 
>   struct timespec tv[10] = {{0}};

No objection.

> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -4423,7 +4423,7 @@ sub process {
>  
>  # closing brace should have a space following it when it has anything
>  # on the line
> -		if ($line =~ /}(?!(?:,|;|\)))\S/) {
> +		if ($line =~ /}(?!(?:,|;|}|\)))\S/) {

But perhaps this is easier to understand:

		if ($line =~ /}(?![,;}\)]\S/

      reply	other threads:[~2017-10-23 22:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-23 13:06 [PATCH] checkpatch: avoid false positive closing bracket with initializers Carlo Marcelo Arenas Belón
2017-10-23 22:18 ` Joe Perches [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=1508797129.1955.5.camel@perches.com \
    --to=joe@perches.com \
    --cc=apw@canonical.com \
    --cc=carenas@gmail.com \
    --cc=linux-kernel@vger.kernel.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.