mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] checkpatch.pl: Update DT vendor prefix check
@ 2020-04-06 21:05 Antony Pavlov
  2020-04-14  9:17 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Antony Pavlov @ 2020-04-06 21:05 UTC (permalink / raw)
  To: barebox

In commit 796af3473b82 ("dts: update to v5.2-rc1")
vendor-prefixes.txt has been converted to a DT schema.
Update the checkpatch.pl DT check to extract vendor prefixes from the new
vendor-prefixes.yaml file.

Based on this linux kernel commit 852d095d16a6
("checkpatch.pl: Update DT vendor prefix check").

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 scripts/checkpatch.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 65c2cfad45..b8bd4e1a59 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3010,7 +3010,7 @@ sub process {
 
 			# linux device tree files
 			my $dt_path = $root . "/dts/Bindings/";
- 			my $vp_file = $dt_path . "vendor-prefixes.txt";
++			my $vp_file = $dt_path . "vendor-prefixes.yaml";
 
 			# barebox-specific bindings
 			$dt_path = $dt_path . " " . $root . "/Documentation/devicetree/bindings/";
@@ -3028,7 +3028,7 @@ sub process {
 
 				next if $compat !~ /^([a-zA-Z0-9\-]+)\,/;
 				my $vendor = $1;
-				`grep -Eq "^$vendor\\b" $vp_file`;
++				`grep -Eq "\\"\\^\Q$vendor\E,\\.\\*\\":" $vp_file`;
 				if ( $? >> 8 ) {
 					WARN("UNDOCUMENTED_DT_STRING",
 					     "DT compatible string vendor \"$vendor\" appears un-documented -- check $vp_file\n" . $herecurr);
-- 
2.25.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] checkpatch.pl: Update DT vendor prefix check
  2020-04-06 21:05 [PATCH] checkpatch.pl: Update DT vendor prefix check Antony Pavlov
@ 2020-04-14  9:17 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2020-04-14  9:17 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

On Tue, Apr 07, 2020 at 12:05:34AM +0300, Antony Pavlov wrote:
> In commit 796af3473b82 ("dts: update to v5.2-rc1")
> vendor-prefixes.txt has been converted to a DT schema.
> Update the checkpatch.pl DT check to extract vendor prefixes from the new
> vendor-prefixes.yaml file.
> 
> Based on this linux kernel commit 852d095d16a6
> ("checkpatch.pl: Update DT vendor prefix check").
> 
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
>  scripts/checkpatch.pl | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-04-14  9:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-06 21:05 [PATCH] checkpatch.pl: Update DT vendor prefix check Antony Pavlov
2020-04-14  9:17 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox