From nobody Fri Jun 12 14:18:39 2026 Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FCB53AD514 for ; Thu, 14 May 2026 10:52:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778755931; cv=none; b=liLTiE+C+EYVZg8aBbnLngqulXTls7FdI6FD/VVe2XJMwi/xHq0DoUbpFtZ3ls31x9Bur33mxTziaZHFlIqblM9Z7HcRFnxWu3KLkd84sAMistPgYI69a9f7boRRTcnJYXyW29Ta9XezVEm8pBYnWwNKPK5cQ3PePhLSe1OUeWI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778755931; c=relaxed/simple; bh=wB7S7AhOnSn6Ek3SrFzWWjjyagQiN1ViNC20Nip436g=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=YhrWlsV282lvEH1976fS5KUTnbnDfx482n9ZsBMPLXz+Rxo2h4ESgsoDFfHr7p7iWatP9b21CLwOEaCTbBO5a59j4LDMT8nso/hvZGbUD46xBVZY7pqozFe8TFO5pR+ahMyOjav6tFafzXfNYJCZenZKLMAAkXkvaVbi+ZQR7sI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=HXGYEay4; arc=none smtp.client-ip=209.85.216.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="HXGYEay4" Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-36627a0ea23so3218456a91.0 for ; Thu, 14 May 2026 03:52:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1778755928; x=1779360728; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=X5Sa2/vj+BE8ys8T+7/Xzc4AP2smOJtHqxOXUV++N94=; b=HXGYEay4Xv6mJ+hb1pC+XbDxi6oxDduDAzS9Ku0l+vZbyjmZGpd/iPRz2owOiRWAAK lmmIO/PO9elYFuzGPNEPECeeRu3owHi+ZV970N83Fn8t0VG1Ms2W7GFm94JXwo9bqR+4 soHxVyGCz66EvDTeLsjHRB+duZ201RYS3MEZg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778755928; x=1779360728; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=X5Sa2/vj+BE8ys8T+7/Xzc4AP2smOJtHqxOXUV++N94=; b=Ynvj4CQ4qXqB4pUi2WZRqXTm/AlwzVEm3ROob8l/EkWfUVQ+5A4XmruYhwaEsKkWJV rRHgmowCMseAKUAb8FvtWfHRetqT1tabvcby51SPf9nOwLWXQIHjDw7y77E1OLjLPTAo 3ytExZPvPbTQtjirGt64r7j+bqxIpQ0FXk4ICtAXzpQv1NUCVnqWJCPtarThVwwKfp/q GfmwxnHzpcOcGmIm8CeSWM5SET9NNd1Uas9dOibY1/qXtPNODzeYZTKEKwwQ/c0eYO/8 5iNqN0kr1bpZlqxiUhoe1nLtvpt4+tpck2JLAd8Mg4/Fc93gT6NGr1xczi7SO4SSc5yw 3WLg== X-Forwarded-Encrypted: i=1; AFNElJ/IBOZdiix3RpcBQ/Gl4uIe9S7U5ZlYuzp4lo5/zK1Mus2ljwHgwLdL3E8VXO0vkNrPipNwh2TvnZcv9V8=@vger.kernel.org X-Gm-Message-State: AOJu0YxSt+YSI4URMkzD5wvNclit7HVWs7wF5WIamO3FfNT/s8y3bqBB WD6GUR9+XO0alAM3JrPuf5dgIxYjz9idohYlBbgvh40lSc7Cfb4Fvuzt4I14BvTx9g== X-Gm-Gg: Acq92OEHsbi+RjBi6jkBSL7NezIDkfF/dv1vds+IiuKfmEnd4GWjTy4UP6KdTEWkPy3 QX8Z2fzLdE9AfXaYWQ82qdSobdb4TYy6Gnd53Xxl9ZlA+fFDrlxKyGk0R2oQdjwsnSsdHpjv+rL AR/PzjRWdbvUTeUBbVxPD+OkrFi2s1NJzguqk2eZbnHs9iNn3GXZGunWf+p1bg/rEH5QQPh7NPl JpmPPjvotZdVr+cV2fEv/ViCu7bNO1FBwzdAwqEVv6bQhuR1FOiSWBPDU0/BHNqsBo5iOroRmER mMVNjBC4uSgg2XNdNL4+Ef7GTL/B/PAzygZXQM0/Jx6Ess7Rmfb5zL99U0ves75OQVVq86hAMPN ywTjeUFsgsYgRhn93k+z3nomH3LW/m76GdwApbUrBxEN4Sn/PmlmvRH4D/Y5mOxoPBlCHc8mvXd CFhCSKdsiCeRmmkK86ROoJn4jsrrQiQ6B0dcAcusZWyuz0ZUA3QvXKELsFDOAgd13Kbwwwj2LiY xFtYClH X-Received: by 2002:a17:90b:50c6:b0:366:527:3c9a with SMTP id 98e67ed59e1d1-368f3e681b3mr8093778a91.15.1778755928535; Thu, 14 May 2026 03:52:08 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2a00:79e0:201d:8:3a91:2f7b:b635:8285]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-368edf6738bsm7435822a91.8.2026.05.14.03.52.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2026 03:52:08 -0700 (PDT) From: Chen-Yu Tsai To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn Cc: Chen-Yu Tsai , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Brian Norris , Yingying Tang Subject: [PATCH] checkpatch: Don't emit warnings for USB & PCI device DT compatible prefixes Date: Thu, 14 May 2026 18:51:50 +0800 Message-ID: <20260514105151.2771474-1-wenst@chromium.org> X-Mailer: git-send-email 2.54.0.563.g4f69b47b94-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 patterns include: - usb[0-9a-f]{1,4},[0-9a-f]{1,4} - pci[0-9a-f]{2,4},[0-9a-f]{1,4} - pciclass,[01][0-9a-f]{3}([0-9a-f]{2})? These are not real vendor prefixes. Don't emit warnings for them. Signed-off-by: Chen-Yu Tsai --- This is a simplified version of what Brian Norris previously posted [1], but more comprehensive and more perl-y than what Yingying Tang posted [2], which only covered the second pattern. Hopefully everyone likes this version. This is based on next-20260508. [1] https://lore.kernel.org/all/20190223022440.146915-1-briannorris@chromiu= m.org/ [2] https://lore.kernel.org/all/20251210073812.1380803-1-yingying.tang@oss.= qualcomm.com/ scripts/checkpatch.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 3727156e4cca..ccedf152acfd 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3795,6 +3795,9 @@ sub process { =20 next if $compat !~ /^([a-zA-Z0-9\-]+)\,/; my $vendor =3D $1; + next if $vendor eq "pciclass"; + next if $vendor =3D~ /^pci[a-f0-9]{2,4}$/; + next if $vendor =3D~ /^usb(if)?[a-f0-9]{1,4}$/; `grep -Eq "\\"\\^\Q$vendor\E,\\.\\*\\":" $vp_file`; if ( $? >> 8 ) { WARN("UNDOCUMENTED_DT_STRING", --=20 2.54.0.563.g4f69b47b94-goog