Skip to content

Commit 89a8835

Browse files
Andy Whitcrofttorvalds
authored andcommitted
checkpatch: ## is not a valid modifier
Inserting a # into the modifiers list will incorrectly add the null string to the modifiers list, leading to an infinite loop. As neither of these is a valid modifier form simply ignore them. Signed-off-by: Andy Whitcroft <apw@canonical.com> Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent d7c76ba commit 89a8835

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

scripts/checkpatch.pl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1224,7 +1224,9 @@ sub possible {
12241224
case|
12251225
else|
12261226
asm|__asm__|
1227-
do
1227+
do|
1228+
\#|
1229+
\#\#|
12281230
)(?:\s|$)|
12291231
^(?:typedef|struct|enum)\b
12301232
)}x;

0 commit comments

Comments
 (0)