[merged mm-nonmm-stable] checkpatch-dont-emit-warnings-for-id-base-usb-pci-dt-compatibles.patch removed from -mm tree
Andrew Morton <[email protected]> Mon, 03 Aug 2026 21:05:18 -0700
| Newsgroups | org.kernel.vger.mm-commits |
|---|---|
| Message-ID | <[email protected]> |
The quilt patch titled
Subject: checkpatch: don't emit warnings for ID-base USB & PCI DT compatibles
has been removed from the -mm tree. Its filename was
checkpatch-dont-emit-warnings-for-id-base-usb-pci-dt-compatibles.patch
This patch was dropped because it was merged into the mm-nonmm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Chen-Yu Tsai <[email protected]>
Subject: checkpatch: don't emit warnings for ID-base USB & PCI DT compatibles
Date: Tue, 7 Jul 2026 15:46:27 +0800
The USB and PCI device bindings define some compatible patterns based on
device IDs that use the comma to separate vendor and product IDs.
These prefix patterns include:
- ^usb(if)?[0-9a-f]{1,4},
- ^pci[0-9a-f]{2,4},
- ^pciclass,
These are not real vendor prefixes. Don't emit warnings for them.
Instead just skip over the DT compatible check altogether, and leave the
real check to the DT validator. This avoids false positive warnings about
undocumented DT vendor prefixes and compatibles.
Note that the script mostly only checks the first compatible string of
each node, as it processes the source file line-by-line, and the check
only matches on the line with 'compatible = "..."'. Otherwise there would
be more warnings from arch/mips/boot/dts/loongson/ls7a-pch.dtsi since that
file also includes compatibles like "pciclass0c0310" and "pciclass0c03"
which are not accepted either. "pci0014,7a24.0" is not valid either, but
this patch leaves the real check to the DT validator.
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Chen-Yu Tsai <[email protected]>
Reviewed-by: Brian Norris <[email protected]>
Tested-by: Brian Norris <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Cc: Dwaipayan Ray <[email protected]>
Cc: Joe Perches <[email protected]>
Cc: Lukas Bulwahn <[email protected]>
Cc: Rob Herring <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
scripts/checkpatch.pl | 6 ++++++
1 file changed, 6 insertions(+)
--- a/scripts/checkpatch.pl~checkpatch-dont-emit-warnings-for-id-base-usb-pci-dt-compatibles
+++ a/scripts/checkpatch.pl
@@ -3781,6 +3781,12 @@ sub process {
my $vp_file = $dt_path . "vendor-prefixes.yaml";
foreach my $compat (@compats) {
+ # Skip ID-based PCI and USB compatible patterns.
+ # DT validation will check them properly.
+ next if $compat =~ /^pciclass,/;
+ next if $compat =~ /^pci[a-f0-9]{2,4},/;
+ next if $compat =~ /^usb(if)?[a-f0-9]{1,4},/;
+
my $compat2 = $compat;
$compat2 =~ s/\,[a-zA-Z0-9]*\-/\,<\.\*>\-/;
my $compat3 = $compat;
_
Patches currently in -mm which might be from [email protected] are