提交 3fef12d6 编写于 作者: A Andy Whitcroft 提交者: Linus Torvalds

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: NAndy Whitcroft <apw@shadowen.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 740504c6
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册