Skip to contentSkip to conversation

dt-bindings: kbuild: Fix dt_binding_check for arch without dts directory

PATCH In review Rob Herring (Arm) 2 participants 2 messages Apr 30, 2024 – May 2, 2024 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: kbuild: Fix dt_binding_check for arch without dts directory

Commit 1d06c77d93da ("dt-bindings: kbuild: Add separate target/dependency for processed-schema.json") placed setting CHECK_DTBS for 'dt_binding_check' target within the section that depends on having arch/$ARCH/boot/dts/ which x86 doesn't have for example. That results in the schema checks not running for the examples. Move setting it back out of the conditional section as it was (CHECK_DT_BINDING is still replaced).

Fixes 1d06c77d93da ("dt-bindings: kbuild: Add separate target/dependency for processed-schema.json")

---
Cc: [email protected]

Masahiro, Please take this as the above commit is in your tree.

 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Makefile +5 -1
index f4fe5b0ea931..43a2a630436a 100644
@@ -1403,7 +1403,7 @@ dtbs: dtbs_prepare
 # dtbs_install depend on it as dtbs_install may run as root.
 dtbs_prepare: include/config/kernel.release scripts_dtc
 
-ifneq ($(filter dt_binding_check dtbs_check, $(MAKECMDGOALS)),)
+ifneq ($(filter dtbs_check, $(MAKECMDGOALS)),)
 export CHECK_DTBS=y
 endif
 
@@ -1422,6 +1422,10 @@ endif
 
 endif
 
+ifneq ($(filter dt_binding_check, $(MAKECMDGOALS)),)
+export CHECK_DTBS=y
+endif
+
 PHONY += scripts_dtc
 scripts_dtc: scripts_basic
 	$(Q)$(MAKE) $(build)=scripts/dtc
Signature · 1 line
2.43.0
#1 lore raw
Quoted 9 lines · Rob Herring (Arm)

Commit 1d06c77d93da ("dt-bindings: kbuild: Add separate target/dependency for processed-schema.json") placed setting CHECK_DTBS for 'dt_binding_check' target within the section that depends on having arch/$ARCH/boot/dts/ which x86 doesn't have for example. That results in the schema checks not running for the examples. Move setting it back out of the conditional section as it was (CHECK_DT_BINDING is still replaced).

Quoted 6 lines
Fixes 1d06c77d93da ("dt-bindings: kbuild: Add separate target/dependency for processed-schema.json")

---
Cc: [email protected]

Masahiro, Please take this as the above commit is in your tree.

I squashed this to the original commit.

Thanks.

Quoted 31 lines
 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Makefile +5 -2
index f4fe5b0ea931..43a2a630436a 100644
@@ -1403,7 +1403,7 @@ dtbs: dtbs_prepare
 # dtbs_install depend on it as dtbs_install may run as root.
 dtbs_prepare: include/config/kernel.release scripts_dtc
 
-ifneq ($(filter dt_binding_check dtbs_check, $(MAKECMDGOALS)),)
+ifneq ($(filter dtbs_check, $(MAKECMDGOALS)),)
 export CHECK_DTBS=y
 endif
 
@@ -1422,6 +1422,10 @@ endif
 
 endif
 
+ifneq ($(filter dt_binding_check, $(MAKECMDGOALS)),)
+export CHECK_DTBS=y
+endif
+
 PHONY += scripts_dtc
 scripts_dtc: scripts_basic
        $(Q)$(MAKE) $(build)=scripts/dtc
--

2.43.0

Signature · 2 lines
Best Regards
Masahiro Yamada