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: upstream/snapshot3+hdmi~22258 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3fef12d6cb832327a981b03326f8f07abebb51b7;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.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 862e8e0..ada27c4 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) {