[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <82b7d3bb2799468a715e280366401f732d83cfdf.camel@perches.com>
Date: Fri, 22 Feb 2019 16:52:28 -0800
From: Joe Perches <joe@...ches.com>
To: Brian Norris <briannorris@...omium.org>,
Andy Whitcroft <apw@...onical.com>
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Subject: Re: [PATCH] checkpatch: don't complain about "undocumented" USB VID
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?
Powered by blists - more mailing lists