]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
checkpatch: ## is not a valid modifier
authorAndy Whitcroft <apw@canonical.com>
Thu, 8 Dec 2011 04:42:22 +0000 (15:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 13 Dec 2011 06:43:20 +0000 (17:43 +1100)
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>
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;