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
3041 if ($dstat ne '' &&3041 if ($dstat ne '' &&
3042 $dstat !~ /^(?:$Ident|-?$Constant),$/ && # 10, // foo(),3042 $dstat !~ /^(?:$Ident|-?$Constant),$/ && # 10, // foo(),
3043 $dstat !~ /^(?:$Ident|-?$Constant);$/ && # foo();3043 $dstat !~ /^(?:$Ident|-?$Constant);$/ && # foo();
3044 $dstat !~ /^[!~-]?(?:$Ident|$Constant)$/ && # 10 // foo() // !foo // ~foo // -foo3044 $dstat !~ /^[!~-]?(?:$Lval|$Constant)$/ && # 10 // foo() // !foo // ~foo // -foo // foo->bar // foo.bar->baz
3045 $dstat !~ /^'X'$/ && # character constants3045 $dstat !~ /^'X'$/ && # character constants
3046 $dstat !~ /$exceptions/ &&3046 $dstat !~ /$exceptions/ &&
3047 $dstat !~ /^\.$Ident\s*=/ && # .foo =3047 $dstat !~ /^\.$Ident\s*=/ && # .foo =