Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167761
b: refs/heads/master
c: 9a974fd
h: refs/heads/master
i:
  167759: e91ad0e
v: v3
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed Oct 29, 2009
1 parent a3fa79d commit 6bab212
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1a83e175dc2c7be931a3ea9c7fb0769e6de55e90
refs/heads/master: 9a974fdbe3fbb4b0f6d552579dc79ac237412c61
20 changes: 12 additions & 8 deletions trunk/scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -997,23 +997,25 @@ sub annotate_values {

sub possible {
my ($possible, $line) = @_;

print "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
if ($possible !~ /(?:
my $notPermitted = qr{(?:
^(?:
$Modifier|
$Storage|
$Type|
DEFINE_\S+|
DEFINE_\S+
)$|
^(?:
goto|
return|
case|
else|
asm|__asm__|
do
)$|
)(?:\s|$)|
^(?:typedef|struct|enum)\b
)/x) {
)}x;
warn "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
if ($possible !~ $notPermitted) {
# Check for modifiers.
$possible =~ s/\s*$Storage\s*//g;
$possible =~ s/\s*$Sparse\s*//g;
Expand All @@ -1022,8 +1024,10 @@ sub possible {
} elsif ($possible =~ /\s/) {
$possible =~ s/\s*$Type\s*//g;
for my $modifier (split(' ', $possible)) {
warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
push(@modifierList, $modifier);
if ($modifier !~ $notPermitted) {
warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
push(@modifierList, $modifier);
}
}

} else {
Expand Down

0 comments on commit 6bab212

Please sign in to comment.