2019-08-11 22:56:47

by John Hubbard

[permalink] [raw]
Subject: [PATCH 1/1] checkpatch: revert broken NOTIFIER_HEAD check

From: John Hubbard <[email protected]>

commit 1a47005dd5aa ("checkpatch: add *_NOTIFIER_HEAD as var
definition") causes the following warning when run on some
patches:

Unescaped left brace in regex is passed through in regex;
marked by < --HERE in m/(?:
...
[238 lines of appalling perl output, mercifully not included]
...
)/ at ./scripts/checkpatch.pl line 3889.

This is broken, so revert it until a better solution is found.

Fixes: 1a47005dd5aa ("checkpatch: add *_NOTIFIER_HEAD as var
definition")

Cc: Andy Whitcroft <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Gilad Ben-Yossef <[email protected]>
Cc: Ofir Drang <[email protected]>
Cc: Andrew Morton <[email protected]>
Signed-off-by: John Hubbard <[email protected]>
---
scripts/checkpatch.pl | 1 -
1 file changed, 1 deletion(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 1cdacb4fd207..9fc206ab3c0c 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3891,7 +3891,6 @@ sub process {
^.DEFINE_$Ident\(\Q$name\E\)|
^.DECLARE_$Ident\(\Q$name\E\)|
^.LIST_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) {
--
2.22.0


2019-08-12 01:31:38

by Stephen Rothwell

[permalink] [raw]
Subject: Re: [PATCH 1/1] checkpatch: revert broken NOTIFIER_HEAD check

Hi John,

On Sun, 11 Aug 2019 15:54:43 -0700 [email protected] wrote:
>
> From: John Hubbard <[email protected]>
>
> commit 1a47005dd5aa ("checkpatch: add *_NOTIFIER_HEAD as var
> definition") causes the following warning when run on some
> patches:
>
> Unescaped left brace in regex is passed through in regex;
> marked by < --HERE in m/(?:
> ...
> [238 lines of appalling perl output, mercifully not included]
> ...
> )/ at ./scripts/checkpatch.pl line 3889.
>
> This is broken, so revert it until a better solution is found.
>
> Fixes: 1a47005dd5aa ("checkpatch: add *_NOTIFIER_HEAD as var
> definition")

Thanks for the report.

I have removed that patch from linux-next today.

--
Cheers,
Stephen Rothwell


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature