summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2008-10-16 07:02:36 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 20:21:37 +0200
commit3fef12d6cb832327a981b03326f8f07abebb51b7 (patch)
tree418ea019c04e979862e47dd423ccb92ea5f04e3b /scripts
parentcheckpatch: suspect indent handle macro continuation (diff)
downloadlinux-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-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 {
# 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)
{