]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
checkpatch: typeof may have more complex arguments
authorAndy Whitcroft <apw@canonical.com>
Fri, 2 Dec 2011 03:12:46 +0000 (14:12 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 7 Dec 2011 05:32:57 +0000 (16:32 +1100)
typeof may have various more complex forms as its arguement, not just an
identifier.  For now allow us to leak to the first close perenthesis ')'.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
scripts/checkpatch.pl

index 497416c8360be6ee8381ad8864272d35e9d804da..eb4b55940c0ea0aab54a1dbd860797ddc816a169 100755 (executable)
@@ -315,7 +315,7 @@ sub build_types {
        $NonptrType     = qr{
                        (?:$Modifier\s+|const\s+)*
                        (?:
-                               (?:typeof|__typeof__)\s*\(\s*\**\s*$Ident\s*\)|
+                               (?:typeof|__typeof__)\s*\([^\)]*\)|
                                (?:$typeTypedefs\b)|
                                (?:${all}\b)
                        )