From: Rob Herring <robh@kernel.org>
To: Brian Norris <briannorris@chromium.org>
Cc: Andy Whitcroft <apw@canonical.com>, Joe Perches <joe@perches.com>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2] checkpatch: handle PCI/USB VID,PID in DT compatible
Date: Tue, 26 Feb 2019 16:31:51 -0600 [thread overview]
Message-ID: <20190226223151.GA21838@bogus> (raw)
In-Reply-To: <20190223022440.146915-1-briannorris@chromium.org>
On Fri, Feb 22, 2019 at 06:24:40PM -0800, Brian Norris wrote:
> Documentation/devicetree/bindings/usb/usb-device.txt describes the
> 'usbVID,...' compatible format, where VID is lower-case hexadecimal,
> with leading zeroes suppressed. Allow it here without complaining about
> lack of documentation (we don't need a new entry for every ID).
>
> PCI has a similar format
> Documentation/devicetree/bindings/pci/pci.txt
> http://www.devicetree.org/open-firmware/bindings/pci/pci2_1.pdf
>
> For both, I try to detect something that's close to a VID,PID, but I
> intentionally don't parse beyond 4 characters of PID, since USB supports
> extending with an interface index, and PCI supports additional subystem
> IDs.
Now that we have DT schema, that would be a better place to check the
formatting. So I'm fine with this, but going back to the simpler version
would be fine too.
We will also be able to really check that compatibles are documented
rather than just grepping the bindings for a compatible string.
> Signed-off-by: Brian Norris <briannorris@chromium.org>
> ---
> Overall, this got a little more unwieldy, but it works.
>
> v2:
> * Include PCI in addition to USB
> * Add special warning for leading zeroes and for upper-case
> * Move the VID,PID check up higher, so we don't complain about
> documentation at all if using the correct format
> ---
> scripts/checkpatch.pl | 21 +++++++++++++++++++--
> 1 file changed, 19 insertions(+), 2 deletions(-)
next prev parent reply other threads:[~2019-02-26 22:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-23 2:24 [PATCH v2] checkpatch: handle PCI/USB VID,PID in DT compatible Brian Norris
2019-02-26 22:31 ` Rob Herring [this message]
2019-02-26 23:53 ` 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=20190226223151.GA21838@bogus \
--to=robh@kernel.org \
--cc=apw@canonical.com \
--cc=briannorris@chromium.org \
--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;
as well as URLs for NNTP newsgroup(s).