mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-03 18:20:25 +02:00 
			
		
		
		
	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 <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
		
							parent
							
								
									740504c61f
								
							
						
					
					
						commit
						3fef12d6cb
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -2043,7 +2043,7 @@ sub process {
 | 
				
			||||||
# case and default should not have general statements after them
 | 
					# case and default should not have general statements after them
 | 
				
			||||||
		if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
 | 
							if ($line =~ /^.\s*(?:case\s*.*|default\s*):/g &&
 | 
				
			||||||
		    $line !~ /\G(?:
 | 
							    $line !~ /\G(?:
 | 
				
			||||||
			(?:\s*{)?(?:\s*$;*)(?:\s*\\)?\s*$|
 | 
								(?:\s*$;*)(?:\s*{)?(?:\s*$;*)(?:\s*\\)?\s*$|
 | 
				
			||||||
			\s*return\s+
 | 
								\s*return\s+
 | 
				
			||||||
		    )/xg)
 | 
							    )/xg)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue