Skip to contentSkip to conversation

dt-bindings: don't anchor DT_SCHEMA_FILES to bindings directory

PATCH In review André Draszik 3 participants 3 messages Jan 16, 2024 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: don't anchor DT_SCHEMA_FILES to bindings directory

From: André Draszik <[email protected]>

Commit 5e3ef4546819 ("dt-bindings: ignore paths outside kernel for DT_SCHEMA_FILES") anchored all searches to the bindings directory (since bindings only exist below that), but it turns out this is not always desired.

Just anchor to the base kernel source directory and while at it, break the overly long line for legibility.

---
 Documentation/devicetree/bindings/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/Makefile +4 -1
index 2323fd5b7cda..129cf698fa8a 100644
@@ -28,7 +28,10 @@ $(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) | sed 's|^$(srctree)/$(src)/||' | grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | sed 's|^|$(srctree)/$(src)/|'
+find_cmd = $(find_all_cmd) | \
+		sed 's|^$(srctree)/||' | \
+		grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | \
+		sed 's|^|$(srctree)/|'
 CHK_DT_DOCS := $(shell $(find_cmd))
 
 quiet_cmd_yamllint = LINT    $(src)
Signature · 1 line
2.43.0
Tested-by on v1 1/1
#1 lore raw
Quoted 24 lines · André Draszik

From: André Draszik <[email protected]>

Commit 5e3ef4546819 ("dt-bindings: ignore paths outside kernel for DT_SCHEMA_FILES") anchored all searches to the bindings directory (since bindings only exist below that), but it turns out this is not always desired.

Just anchor to the base kernel source directory and while at it, break the overly long line for legibility.

---
  Documentation/devicetree/bindings/Makefile | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/Makefile +0 -0
index 2323fd5b7cda..129cf698fa8a 100644
@@ -28,7 +28,10 @@ $(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE
  find_all_cmd = find $(srctree)/$(src) \( -name '*.yaml' ! \

Documentation/devicetree/bindings/Makefile $(obj)/%.example.dts: $(src)/%.yaml check_dtschema_version FORCE · line 37

Quoted 10 lines
Documentation/devicetree/bindings/Makefile +4 -1
  		-name 'processed-schema*' \)
 
-find_cmd = $(find_all_cmd) | sed 's|^$(srctree)/$(src)/||' | grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | sed 's|^|$(srctree)/$(src)/|'
+find_cmd = $(find_all_cmd) | \
+		sed 's|^$(srctree)/||' | \
+		grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | \
+		sed 's|^|$(srctree)/|'
  CHK_DT_DOCS := $(shell $(find_cmd))
 
  quiet_cmd_yamllint = LINT    $(src)

Thanks,
Michal

maintainer
#2 lore raw
In reply to André Draszik
Quoted 10 lines · André Draszik

From: André Draszik <[email protected]>

Commit 5e3ef4546819 ("dt-bindings: ignore paths outside kernel for DT_SCHEMA_FILES") anchored all searches to the bindings directory (since bindings only exist below that), but it turns out this is not always desired.

Just anchor to the base kernel source directory and while at it, break the overly long line for legibility.

Quoted 8 lines
---
 Documentation/devicetree/bindings/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Added a 'Fixes' tag and applied, thanks!