Skip to content

Commit 3cc4b1c

Browse files
JoePerchestorvalds
authored andcommitted
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 <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 9d7a34a commit 3cc4b1c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/checkpatch.pl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3041,7 +3041,7 @@ sub process {
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 =

0 commit comments

Comments
 (0)