Skip to content

Commit 954c55c

Browse files
committed
dt-bindings: kbuild: Skip validating empty examples
Extracting empty examples results in just the empty template being generated and then validated. That's pointless and not free, so filter out the schemas without any examples from the targets. There's currently a little less than 10% of the binding schema files without examples. Removing them improves the build time by ~6%. Link: https://patch.msgid.link/20251201175030.3785060-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
1 parent 7838c7a commit 954c55c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • Documentation/devicetree/bindings

Documentation/devicetree/bindings/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ find_cmd = $(find_all_cmd) | \
3232
sed 's|^$(srctree)/||' | \
3333
grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | \
3434
sed 's|^|$(srctree)/|'
35-
CHK_DT_EXAMPLES := $(patsubst $(srctree)/%.yaml,%.example.dtb, $(shell $(find_cmd)))
35+
CHK_DT_EXAMPLES := $(patsubst $(srctree)/%.yaml,%.example.dtb, \
36+
$(shell $(find_cmd) | xargs grep -l '^examples:'))
3637

3738
quiet_cmd_yamllint = LINT $(src)
3839
cmd_yamllint = ($(find_cmd) | \

0 commit comments

Comments
 (0)