Skip to contentSkip to conversation

checkpatch.pl: Update DT vendor prefix check

PATCH Applied Antony Pavlov 2 participants 2 messages Apr 6, 2020 – Apr 14, 2020 Checkpatch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 checkpatch.pl: Update DT vendor prefix check

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").

---
 scripts/checkpatch.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/checkpatch.pl +2 -2
index 65c2cfad45..b8bd4e1a59 100755
@@ -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);
Signature · 7 lines
2.25.0


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 5 lines · Antony Pavlov

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.

Quoted 7 lines

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

---
 scripts/checkpatch.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks

Sascha

Signature · 9 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox