diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index eb8f88787e81f0f0036c0cbc4bf23c70b4465a10..e3d9c34b1b53cfb33607954f1bce8788a2c6d26e 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4291,7 +4291,7 @@ sub process { my $comp = $3; my $to = $4; my $newcomp = $comp; - if ($lead !~ /$Operators\s*$/ && + if ($lead !~ /(?:$Operators|\.)\s*$/ && $to !~ /^(?:Constant|[A-Z_][A-Z0-9_]*)$/ && WARN("CONSTANT_COMPARISON", "Comparisons should place the constant on the right side of the test\n" . $herecurr) &&