Skip to contentSkip to conversation

checkpatch: skip vendor-prefix check for pciNNNN DT compatibles

PATCH New Yingying Tang 1 participant 1 message Dec 10, 2025 Checkpatch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 checkpatch: skip vendor-prefix check for pciNNNN DT compatibles

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.

---
 scripts/checkpatch.pl | 4 ++++
 1 file changed, 4 insertions(+)
scripts/checkpatch.pl +4 -0
index c0250244cf7a..b1eea8f532a0 100755
@@ -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",
Signature · 1 line
2.25.1