checkpatch: ## is not a valid modifier
authorAndy Whitcroft <[email protected]>
Tue, 10 Jan 2012 23:10:00 +0000 (15:10 -0800)
committerLinus Torvalds <[email protected]>
Wed, 11 Jan 2012 00:30:50 +0000 (16:30 -0800)
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 <[email protected]>
Reported-by: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
scripts/checkpatch.pl

index 4c53d6f67339bcef861c54f64b39af10c7c41406..b4390cf818da6327fe8f571fd5cc5756010dc311 100755 (executable)
@@ -1224,7 +1224,9 @@ sub possible {
                        case|
                        else|
                        asm|__asm__|
-                       do
+                       do|
+                       \#|
+                       \#\#|
                )(?:\s|$)|
                ^(?:typedef|struct|enum)\b
            )}x;