From de695f7fb8dc746784901fa7ff56a737ad2bf99e Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Thu, 8 Dec 2011 15:42:22 +1100 Subject: [PATCH] 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 Reported-by: Joe Perches Signed-off-by: Andrew Morton --- scripts/checkpatch.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 4c53d6f67339..b4390cf818da 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1224,7 +1224,9 @@ sub possible { case| else| asm|__asm__| - do + do| + \#| + \#\#| )(?:\s|$)| ^(?:typedef|struct|enum)\b )}x; -- 2.39.5