summaryrefslogtreecommitdiff
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl9
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 223681bfd0..42e1c50dd8 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1132,11 +1132,10 @@ sub possible {
case|
else|
asm|__asm__|
- do|
- \#|
- \#\#
+ do
)(?:\s|$)|
- ^(?:typedef|struct|enum)\b
+ ^(?:typedef|struct|enum)\b|
+ ^\#
)}x;
warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
if ($possible !~ $notPermitted) {
@@ -1146,7 +1145,7 @@ sub possible {
if ($possible =~ /^\s*$/) {
} elsif ($possible =~ /\s/) {
- $possible =~ s/\s*$Type\s*//g;
+ $possible =~ s/\s*(?:$Type|\#\#)\s*//g;
for my $modifier (split(' ', $possible)) {
if ($modifier !~ $notPermitted) {
warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);