mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 09:16:33 +00:00
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>
This commit is contained in:
parent
9d7a34a513
commit
3cc4b1c3f0
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user