From 36cc3737eab1a2360190ce38d7bee9cc4457dd55 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Wed, 23 Jul 2008 21:29:09 -0700 Subject: [PATCH] --- yaml --- r: 105401 b: refs/heads/master c: d2506586586c59f5db0e2ce00d5d31ccec6260b8 h: refs/heads/master i: 105399: 36ab3d9d0778a055c00c14b6b726d7c11c0ca5ec v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 868e0c8a2af0..1c58ecdbd0c3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0221f55c142b0ac8baf6f0b6c4e1ec89f0c98e96 +refs/heads/master: d2506586586c59f5db0e2ce00d5d31ccec6260b8 diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 9c209165f252..8a3b0fd67ad7 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -859,8 +859,10 @@ sub possible { } elsif ($possible =~ /\s/) { $possible =~ s/\s*$Type\s*//g; - warn "MODIFIER: $possible ($line)\n" if ($dbg_possible); - push(@modifierList, $possible); + for my $modifier (split(' ', $possible)) { + warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible); + push(@modifierList, $modifier); + } } else { warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible); @@ -1186,7 +1188,7 @@ sub process { } elsif ($s =~ /^.\s*$Ident\s*\(/s) { # declarations always start with types - } elsif ($prev_values eq 'E' && $s =~ /^.\s*(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?((?:\s*$Ident)+)\b(?:\s+$Sparse)?\s*\**\s*(?:$Ident|\(\*[^\)]*\))\s*(?:;|=|,|\()/s) { + } elsif ($prev_values eq 'E' && $s =~ /^.\s*(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?((?:\s*$Ident)+?)\b(?:\s+$Sparse)?\s*\**\s*(?:$Ident|\(\*[^\)]*\))(?:\s*$Modifier)?\s*(?:;|=|,|\()/s) { my $type = $1; $type =~ s/\s+/ /g; possible($type, "A:" . $s);