diff options
author | Andy Whitcroft <apw@canonical.com> | 2012-01-10 18:10:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 19:30:50 -0500 |
commit | 89a883530fe79939384a6c6ed893c719762c7c9c (patch) | |
tree | 49d1dd395c3029ab6261c8d217f53642d77bdc0f | |
parent | d7c76ba7e58bc3ca674f20759c686535db484749 (diff) |
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>
-rwxr-xr-x | scripts/checkpatch.pl | 4 |
1 files changed, 3 insertions, 1 deletions
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 { | |||
1224 | case| | 1224 | case| |
1225 | else| | 1225 | else| |
1226 | asm|__asm__| | 1226 | asm|__asm__| |
1227 | do | 1227 | do| |
1228 | \#| | ||
1229 | \#\#| | ||
1228 | )(?:\s|$)| | 1230 | )(?:\s|$)| |
1229 | ^(?:typedef|struct|enum)\b | 1231 | ^(?:typedef|struct|enum)\b |
1230 | )}x; | 1232 | )}x; |