* + checkpatch-dont-emit-warnings-for-id-base-usb-pci-dt-compatibles.patch added to mm-nonmm-unstable branch
@ 2026-07-07 21:17 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-07-07 21:17 UTC (permalink / raw)
To: mm-commits, robh, lukas.bulwahn, joe, dwaipayanray1, briannorris,
apw, wenst, akpm
The patch titled
Subject: checkpatch: don't emit warnings for ID-base USB & PCI DT compatibles
has been added to the -mm mm-nonmm-unstable branch. Its filename is
checkpatch-dont-emit-warnings-for-id-base-usb-pci-dt-compatibles.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/checkpatch-dont-emit-warnings-for-id-base-usb-pci-dt-compatibles.patch
This patch will later appear in the mm-nonmm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Chen-Yu Tsai <wenst@chromium.org>
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/20260707074629.3132930-1-wenst@chromium.org
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Joe Perches <joe@perches.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
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 wenst@chromium.org are
checkpatch-dont-emit-warnings-for-id-base-usb-pci-dt-compatibles.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-07 21:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-07 21:17 + checkpatch-dont-emit-warnings-for-id-base-usb-pci-dt-compatibles.patch added to mm-nonmm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.