Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3fef12d6 authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Linus Torvalds
Browse files

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: default avatarAndy Whitcroft <apw@shadowen.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 740504c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)
		{