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-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=3fef12d6cb832327a981b03326f8f07abebb51b7;p=openwrt%2Fstaging%2Fblogic.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 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) {