aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2008-10-16 01:02:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 14:21:37 -0400
commit3fef12d6cb832327a981b03326f8f07abebb51b7 (patch)
tree418ea019c04e979862e47dd423ccb92ea5f04e3b /scripts
parent740504c61f79a932564fb7117d79ad53d950b201 (diff)
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-xscripts/checkpatch.pl2
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 {
2043# case and default should not have general statements after them 2043# case and default should not have general statements after them
2044 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g && 2044 if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
2045 $line !~ /\G(?: 2045 $line !~ /\G(?:
2046 (?:\s*{)?(?:\s*$;*)(?:\s*\\)?\s*$| 2046 (?:\s*$;*)(?:\s*{)?(?:\s*$;*)(?:\s*\\)?\s*$|
2047 \s*return\s+ 2047 \s*return\s+
2048 )/xg) 2048 )/xg)
2049 { 2049 {