aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorAndré Draszik <andre.draszik@linaro.org>2023-12-20 14:55:37 +0000
committerRob Herring <robh@kernel.org>2024-01-09 10:56:19 -0600
commit5e3ef45468196498ad1a7132f274d6709e3a1146 (patch)
tree4c9434835bc42cbb969f68aeb9b39d2dcb32c4d9 /Documentation
parent09c49315f4c764366fdcf8ff096dd6fad8b8577c (diff)
downloadlinux-integrator-5e3ef45468196498ad1a7132f274d6709e3a1146.tar.gz
dt-bindings: ignore paths outside kernel for DT_SCHEMA_FILES
If the location of the kernel sources contains the string that we're filtering for using DT_SCHEMA_FILES, then all schemas will currently be matched, returned and checked, not just the ones we actually expected. As an example, if the kernel sources happen to be below a directory 'google', and DT_SCHEMA_FILES=google, everything is checked. More common examples might be having the sources below people's home directories that contain the string st or arm and then searching for those. The list is endless. Fix this by only matching for schemas below the kernel source's bindings directory. Note that I opted for the implementation here so as to not having to deal with escaping DT_SCHEMA_FILES, which would have been the alternative if the grep match itself had been updated. Cc: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: André Draszik <andre.draszik@linaro.org> Link: https://lore.kernel.org/r/20231220145537.2163811-1-andre.draszik@linaro.org Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile
index 3e886194b043bb..2323fd5b7cdae1 100644
--- a/Documentation/devicetree/bindings/Makefile
+++ b/Documentation/devicetree/bindings/Makefile
@@ -28,7 +28,7 @@ $(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE
find_all_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \
-name 'processed-schema*' \)
-find_cmd = $(find_all_cmd) | grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))"
+find_cmd = $(find_all_cmd) | sed 's|^$(srctree)/$(src)/||' | grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | sed 's|^|$(srctree)/$(src)/|'
CHK_DT_DOCS := $(shell $(find_cmd))
quiet_cmd_yamllint = LINT $(src)