We are missing 'simple' values which include square brackets. Refactor to ensure we handle nesting correctly and detect these simple forms.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -2142,9 +2142,10 @@ sub process { · 2141 unmodified lines | |||
| 2142 | $dstat =~ s/\s*$//s; | 2142 | $dstat =~ s/\s*$//s; |
| 2143 | 2143 | ||
| 2144 | # Flatten any parentheses and braces | 2144 | # Flatten any parentheses and braces |
| 2145 | while ($dstat =~ s/\([^\(\)]*\)/1/) { | 2145 | while ($dstat =~ s/\([^\(\)]*\)/1/ || |
| 2146 | } | 2146 | $dstat =~ s/\{[^\{\}]*\}/1/ || |
| 2147 | while ($dstat =~ s/\{[^\{\}]*\}/1/) { | 2147 | $dstat =~ s/\[[^\{\}]*\]/1/) |
| 2148 | { | ||
| 2148 | } | 2149 | } |
| 2149 | 2150 | ||
| 2150 | my $exceptions = qr{ | 2151 | my $exceptions = qr{ |