From 2ad3b166ee88214ea683869be82cbe992af8ed6a Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 19 Jun 2013 10:07:20 +1000 Subject: [PATCH] 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 --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index f4e247b277de..93b8e6693cb1 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 = -- 2.39.5