From: David Laight <David.Laight@ACULAB.COM>
To: 'Joe Perches' <joe@perches.com>, Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: "linux-kernel-mentees@lists.linuxfoundation.org"
<linux-kernel-mentees@lists.linuxfoundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"lukas.bulwahn@gmail.com" <lukas.bulwahn@gmail.com>
Subject: RE: [PATCH] checkpatch: fix unescaped left braces
Date: Tue, 5 Jan 2021 10:35:31 +0000 [thread overview]
Message-ID: <027501cb2506426d9c05adf56d002781@AcuMS.aculab.com> (raw)
In-Reply-To: <cf102ac77eb1f9e6424f30aef835f6c61dd03407.camel@perches.com>
From: Joe Perches
> Sent: 05 January 2021 10:01
>
> On Tue, 2021-01-05 at 15:05 +0530, Dwaipayan Ray wrote:
> > Perl 5.22 onwards require that "A literal "{" should now be
> > escaped in a pattern".
Sounds like a good reason to never use perl :-)
> Not quite correct.
>
> > checkpatch contains several literal "{". Fix such instances
> > by preceding them with a backslash.
>
> Not all literal left braces need to be escaped.
> https://www.perlmonks.org/?node_id=1191981
>
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
> > @@ -2036,7 +2036,7 @@ sub annotate_values {
> > print "ASSIGN($1)\n" if ($dbg_values > 1);
> > $type = 'N';
> >
> >
> > - } elsif ($cur =~/^(;|{|})/) {
> > + } elsif ($cur =~ /^(;|\{|\})/) {
isn't (;|{|}) much the same as [;{}] ??
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
next prev parent reply other threads:[~2021-01-05 10:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-05 9:35 Dwaipayan Ray
2021-01-05 10:01 ` Joe Perches
2021-01-05 10:08 ` Dwaipayan Ray
2021-01-05 10:35 ` David Laight [this message]
2021-01-05 10:49 ` Joe Perches
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=027501cb2506426d9c05adf56d002781@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=dwaipayanray1@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
/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
all inboxes | Powered by JetHome®