From 05aeca7cb0a2f53a307c329ba758f1e88972a360 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Thu, 9 May 2019 08:53:44 -0500 Subject: dt-bindings: Pass binding directory to validation tools In order to have $ref's to schema files within the kernel, we need to pass the base path of bindings to the schema validation tools. Cc: Masahiro Yamada Cc: Michal Marek Cc: devicetree@vger.kernel.org Cc: linux-kbuild@vger.kernel.org Signed-off-by: Rob Herring --- scripts/Makefile.lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 1b412d4394ae..f1f38c8cdc74 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -298,7 +298,7 @@ DT_BINDING_DIR := Documentation/devicetree/bindings DT_TMP_SCHEMA := $(objtree)/$(DT_BINDING_DIR)/processed-schema.yaml quiet_cmd_dtb_check = CHECK $@ - cmd_dtb_check = $(DT_CHECKER) -p $(DT_TMP_SCHEMA) $@ ; + cmd_dtb_check = $(DT_CHECKER) -u $(srctree)/$(DT_BINDING_DIR) -p $(DT_TMP_SCHEMA) $@ ; define rule_dtc_dt_yaml $(call cmd_and_fixdep,dtc,yaml) -- cgit v1.2.3 From 852d095d16a6298834839f441593f59d58a31978 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Wed, 22 May 2019 09:55:34 -0500 Subject: checkpatch.pl: Update DT vendor prefix check In commit 8122de54602e ("dt-bindings: Convert vendor prefixes to json-schema"), 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. Fixes: 8122de54602e ("dt-bindings: Convert vendor prefixes to json-schema") Cc: Joe Perches Signed-off-by: Rob Herring --- scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index bb28b178d929..342c7c781ba5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3027,7 +3027,7 @@ sub process { my @compats = $rawline =~ /\"([a-zA-Z0-9\-\,\.\+_]+)\"/g; my $dt_path = $root . "/Documentation/devicetree/bindings/"; - my $vp_file = $dt_path . "vendor-prefixes.txt"; + my $vp_file = $dt_path . "vendor-prefixes.yaml"; foreach my $compat (@compats) { my $compat2 = $compat; @@ -3042,7 +3042,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); -- cgit v1.2.3