From: Joe Perches Date: Wed, 3 Jul 2013 22:05:27 +0000 (-0700) Subject: checkpatch: reduce false positive rate of "complex macros" X-Git-Tag: upstream/snapshot3+hdmi~4788^2~229 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3cc4b1c3f0d283f4bb8d49059bd6df8e7af7558b;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git checkpatch: reduce false positive rate of "complex macros" Allow "#define foo struct.member" without bleating a warning. This also allows "#define foo bar.baz->qux" and so on. Signed-off-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index f4e247b2..93b8e66 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3041,7 +3041,7 @@ sub process { if ($dstat ne '' && $dstat !~ /^(?:$Ident|-?$Constant),$/ && # 10, // foo(), $dstat !~ /^(?:$Ident|-?$Constant);$/ && # foo(); - $dstat !~ /^[!~-]?(?:$Ident|$Constant)$/ && # 10 // foo() // !foo // ~foo // -foo + $dstat !~ /^[!~-]?(?:$Lval|$Constant)$/ && # 10 // foo() // !foo // ~foo // -foo // foo->bar // foo.bar->baz $dstat !~ /^'X'$/ && # character constants $dstat !~ /$exceptions/ && $dstat !~ /^\.$Ident\s*=/ && # .foo =