From: Joe Perches <joe@perches.com>
To: Heinrich Schuchardt <xypron.glpk@gmx.de>,
Andy Whitcroft <apw@canonical.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] checkpatch: allow space between colon and bracket
Date: Tue, 03 Apr 2018 14:20:59 -0700 [thread overview]
Message-ID: <1522790459.11653.65.camel@perches.com> (raw)
In-Reply-To: <20180403191655.23700-1-xypron.glpk@gmx.de>
On Tue, 2018-04-03 at 21:16 +0200, Heinrich Schuchardt wrote:
> Allow a space between a colon and subsequent opening bracket.
> This sequence may occur in inline assembler statements like
>
> asm(
> "ldr %[out], [%[in]]\n\t"
> : [out] "=r" (ret)
> : [in] "r" (addr)
> );
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
I can't think of a valid c90 sequence that has a colon
before a bracket so
Acked-by: Joe Perches <joe@perches.com>
> ---
> scripts/checkpatch.pl | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index d2464002bb40..2cbab86e6d4c 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -4083,7 +4083,7 @@ sub process {
> my ($where, $prefix) = ($-[1], $1);
> if ($prefix !~ /$Type\s+$/ &&
> ($where != 0 || $prefix !~ /^.\s+$/) &&
> - $prefix !~ /[{,]\s+$/) {
> + $prefix !~ /[{,:]\s+$/) {
> if (ERROR("BRACKET_SPACE",
> "space prohibited before open square bracket '['\n" . $herecurr) &&
> $fix) {
prev parent reply other threads:[~2018-04-03 21:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 19:02 [BUG] checkpatch.pl: false positive: space prohibited before open square bracket Heinrich Schuchardt
2018-04-03 19:16 ` [PATCH 1/1] checkpatch: allow space between colon and bracket Heinrich Schuchardt
2018-04-03 21:20 ` 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=1522790459.11653.65.camel@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xypron.glpk@gmx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).