diff options
author | Andy Whitcroft <apw@shadowen.org> | 2008-10-16 07:02:36 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 20:21:37 +0200 |
commit | 3fef12d6cb832327a981b03326f8f07abebb51b7 (patch) | |
tree | 418ea019c04e979862e47dd423ccb92ea5f04e3b /scripts | |
parent | checkpatch: suspect indent handle macro continuation (diff) | |
download | linux-3fef12d6cb832327a981b03326f8f07abebb51b7.tar.xz linux-3fef12d6cb832327a981b03326f8f07abebb51b7.zip |
checkpatch: allow for comments either side of a brace on case
When specifying case we may have comments and/or braces at the end without
actually having a 'statement'. Allow for these to occur in any order.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rwxr-xr-x | scripts/checkpatch.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 862e8e0e86ae..ada27c44da02 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2043,7 +2043,7 @@ sub process { # case and default should not have general statements after them if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g && $line !~ /\G(?: - (?:\s*{)?(?:\s*$;*)(?:\s*\\)?\s*$| + (?:\s*$;*)(?:\s*{)?(?:\s*$;*)(?:\s*\\)?\s*$| \s*return\s+ )/xg) { |