History

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.

Joe Perches committed 13 years ago

Commit 3cc4b1c1 parent 9d7a34a1 file · +1 −1Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+1−1
@@ -3041,7 +3041,7 @@ sub process { · 3040 unmodified lines
30413041 if ($dstat ne '' &&
30423042 $dstat !~ /^(?:$Ident|-?$Constant),$/ && # 10, // foo(),
30433043 $dstat !~ /^(?:$Ident|-?$Constant);$/ && # foo();
3044− $dstat !~ /^[!~-]?(?:$Ident|$Constant)$/ && # 10 // foo() // !foo // ~foo // -foo
3044+ $dstat !~ /^[!~-]?(?:$Lval|$Constant)$/ && # 10 // foo() // !foo // ~foo // -foo // foo->bar // foo.bar->baz
30453045 $dstat !~ /^'X'$/ && # character constants
30463046 $dstat !~ /$exceptions/ &&
30473047 $dstat !~ /^\.$Ident\s*=/ && # .foo =