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

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

checkpatch: complex macros checks miss square brackets



We are missing 'simple' values which include square brackets.  Refactor to
ensure we handle nesting correctly and detect these simple forms.

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 f16fa28f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2142,9 +2142,10 @@ sub process {
			$dstat =~ s/\s*$//s;

			# Flatten any parentheses and braces
			while ($dstat =~ s/\([^\(\)]*\)/1/) {
			}
			while ($dstat =~ s/\{[^\{\}]*\}/1/) {
			while ($dstat =~ s/\([^\(\)]*\)/1/ ||
			       $dstat =~ s/\{[^\{\}]*\}/1/ ||
			       $dstat =~ s/\[[^\{\}]*\]/1/)
			{
			}

			my $exceptions = qr{