diff options
author | Andy Whitcroft <apw@shadowen.org> | 2008-10-15 22:02:36 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-16 11:21:37 -0700 |
commit | 3fef12d6cb832327a981b03326f8f07abebb51b7 (patch) | |
tree | 418ea019c04e979862e47dd423ccb92ea5f04e3b /scripts | |
parent | 740504c61f79a932564fb7117d79ad53d950b201 (diff) | |
download | linux-stable-3fef12d6cb832327a981b03326f8f07abebb51b7.tar.gz linux-stable-3fef12d6cb832327a981b03326f8f07abebb51b7.tar.bz2 linux-stable-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 'scripts')
-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) { |