Some DeviceTree compatibles legitimately use PCI Vendor/Device IDs,
e.g. "pci17cb,1107" (WCN7850/ath12k). These are documented in binding
YAML files and validated by dt-schema, but checkpatch currently treats
the substring before the comma as a vendor prefix that must be listed
in vendor-prefixes.yaml. That yields false warnings like:
WARNING: DT compatible string vendor "pci17cb" appears un-documented
Skip vendor-prefix documentation check when the extracted prefix matches
'pci'. Normal vendor prefixes remain checked.
Signed-off-by: Yingying Tang <yingying.tang@oss.qualcomm.com>
---
scripts/checkpatch.pl | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c0250244cf7a..b1eea8f532a0 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3751,6 +3751,10 @@ sub process {
next if $compat !~ /^([a-zA-Z0-9\-]+)\,/;
my $vendor = $1;
+ if ($vendor =~ /^pci[0-9a-fA-F]{4}$/) {
+ # Skip vendor-prefix documentation check for pciNNNN
+ next;
+ }
`grep -Eq "\\"\\^\Q$vendor\E,\\.\\*\\":" $vp_file`;
if ( $? >> 8 ) {
WARN("UNDOCUMENTED_DT_STRING",
--
2.25.1