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

On Fri, 2019-02-22 at 14:55 -0800, Brian Norris wrote:
> 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.
[]
> diff --git 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},/;

Maybe check the PID too?

				next if $compat =~ /^usb[1-9a-f][0-9a-f]{0,3},[1-9a-f][0-9a-f]{0,3}\b/;


Maybe add a test for uses of the leading 0?



  reply	other threads:[~2019-02-23  0:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 22:55 Brian Norris
2019-02-23  0:52 ` Joe Perches [this message]
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=82b7d3bb2799468a715e280366401f732d83cfdf.camel@perches.com \
    --to=joe@perches.com \
    --cc=apw@canonical.com \
    --cc=briannorris@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --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®