linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
To: Gilad Ben-Yossef <gilad@benyossef.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] scripts/checkpatch.pl - fix *_NOTIFIER_HEAD handling
Date: Wed, 07 Aug 2019 21:36:21 -0400	[thread overview]
Message-ID: <33485.1565228181@turing-police> (raw)

commit 81398d99e9de80d9dbe65dfe7aadec9497f88242
Author: Gilad Ben-Yossef <gilad@benyossef.com>
Date:   Wed Jul 31 14:44:23 2019 +1000

    checkpatch: add *_NOTIFIER_HEAD as var definition

has a typo, resulting in a truly amazing error message:

Unescaped left brace in regex is passed through in regex; marked by <-- HERE in m/(?:
                                \n.}\s*$|
                                ^.DEFINE_(?^x:
                        [A-Za-z_][A-Za-z\d_]*
                        (?:\s*\#\#\s*[A-Za-z_][A-Za-z\d_]*)*
                )\(rtl_usb_probe\)|
                                ^.DECLARE_(?^x:
                        [A-Za-z_][A-Za-z\d_]*
                        (?:\s*\#\#\s*[A-Za-z_][A-Za-z\d_]*)*
                )\(rtl_usb_probe\)|
                                ^.LIST_HEAD\(rtl_usb_probe\)|
                                ^.{ <-- HERE (?^x:
                        [A-Za-z_][A-Za-z\d_]*
                        (?:\s*\#\#\s*[A-Za-z_][A-Za-z\d_]*)*
                )}_NOTIFIER_HEAD\(rtl_usb_probe\)|

(Rexexp dump continues for 236 lines total)

Fix the typo.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 5c00151cdee8..dd095d1e5a19 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3891,7 +3891,7 @@ sub process {
 				^.DEFINE_$Ident\(\Q$name\E\)|
 				^.DECLARE_$Ident\(\Q$name\E\)|
 				^.LIST_HEAD\(\Q$name\E\)|
-				^.{$Ident}_NOTIFIER_HEAD\(\Q$name\E\)|
+				^.${Ident}_NOTIFIER_HEAD\(\Q$name\E\)|
 				^.(?:$Storage\s+)?$Type\s*\(\s*\*\s*\Q$name\E\s*\)\s*\(|
 				\b\Q$name\E(?:\s+$Attribute)*\s*(?:;|=|\[|\()
 			    )/x) {



             reply	other threads:[~2019-08-08  1:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08  1:36 Valdis Klētnieks [this message]
2019-08-08  5:50 ` [PATCH] scripts/checkpatch.pl - fix *_NOTIFIER_HEAD handling Joe Perches
2019-08-08  6:08   ` Valdis Klētnieks
2019-08-08  6:17     ` Joe Perches
2019-08-08 12:45     ` 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=33485.1565228181@turing-police \
    --to=valdis.kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=gilad@benyossef.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 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).