From: Andy Whitcroft Date: Thu, 16 Oct 2008 05:02:36 +0000 (-0700) Subject: checkpatch: allow for comments either side of a brace on case X-Git-Tag: v2.6.28-rc1~462 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3fef12d6cb832327a981b03326f8f07abebb51b7;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 862e8e0e86a..ada27c44da0 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) {