mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>
Cc: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	Brian Norris <briannorris@chromium.org>
Subject: [PATCH] checkpatch: don't complain about "undocumented" USB VID
Date: Fri, 22 Feb 2019 14:55:45 -0800	[thread overview]
Message-ID: <20190222225545.78031-1-briannorris@chromium.org> (raw)

Documentation/devicetree/bindings/usb/usb-device.txt describes the
'usbVID,...' compatible format, where VID is hexadecimal, with leading
zeroes suppressed. Allow it here without complaining.

Signed-off-by: Brian Norris <briannorris@chromium.org>
---
 scripts/checkpatch.pl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b737ca9d7204..124c6fc116b3 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3012,6 +3012,8 @@ sub process {
 				}
 
 				next if $compat !~ /^([a-zA-Z0-9\-]+)\,/;
+				# USB VIDs don't need special vendor prefix documentation.
+				next if $compat =~ /^usb[1-9a-f][0-9a-f]{0,3},/;
 				my $vendor = $1;
 				`grep -Eq "^$vendor\\b" $vp_file`;
 				if ( $? >> 8 ) {
-- 
2.21.0.rc0.258.g878e2cd30e-goog


             reply	other threads:[~2019-02-22 22:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 22:55 Brian Norris [this message]
2019-02-23  0:52 ` Joe Perches
2019-02-23  1:00   ` Brian Norris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190222225545.78031-1-briannorris@chromium.org \
    --to=briannorris@chromium.org \
    --cc=apw@canonical.com \
    --cc=devicetree@vger.kernel.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®