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>
This commit is contained in:
Rob Herring (Arm) 2025-12-01 11:50:29 -06:00
parent 7838c7a9e2
commit 954c55c658
1 changed files with 2 additions and 1 deletions

View File

@ -32,7 +32,8 @@ find_cmd = $(find_all_cmd) | \
sed 's|^$(srctree)/||' | \ sed 's|^$(srctree)/||' | \
grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | \ grep -F -e "$(subst :," -e ",$(DT_SCHEMA_FILES))" | \
sed 's|^|$(srctree)/|' sed 's|^|$(srctree)/|'
CHK_DT_EXAMPLES := $(patsubst $(srctree)/%.yaml,%.example.dtb, $(shell $(find_cmd))) CHK_DT_EXAMPLES := $(patsubst $(srctree)/%.yaml,%.example.dtb, \
$(shell $(find_cmd) | xargs grep -l '^examples:'))
quiet_cmd_yamllint = LINT $(src) quiet_cmd_yamllint = LINT $(src)
cmd_yamllint = ($(find_cmd) | \ cmd_yamllint = ($(find_cmd) | \