kbuild: Build DT binding examples with dtc warnings enabled
authorRob Herring <robh@kernel.org>
Sat, 29 Feb 2020 00:37:31 +0000 (18:37 -0600)
committerMasahiro Yamada <masahiroy@kernel.org>
Tue, 3 Mar 2020 11:49:21 +0000 (20:49 +0900)
Now that we have a separate rule for DT binding examples, we can customize
the dtc options. Let's adjust the dtc warnings to me more strict by
default so the examples get cleaned up as they get converted to schema.

Leaving 'avoid_unnecessary_addr_size' and 'graph_child_address' warnings
disabled as examples tend to be incomplete and they generates a lot of
warnings.

Co-developed-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Documentation/devicetree/bindings/Makefile

index 7c40d5ba1b51715ae08cd5e1bdec52e77b3a6bb4..b62c0470f1225e4a8a4243110afe127d2e17cf42 100644 (file)
@@ -31,6 +31,10 @@ extra-y += $(patsubst $(src)/%.yaml,%.example.dts, $(DT_SCHEMA_FILES))
 extra-y += $(patsubst $(src)/%.yaml,%.example.dt.yaml, $(DT_SCHEMA_FILES))
 extra-y += processed-schema-examples.yaml
 
+override DTC_FLAGS := \
+       -Wno-avoid_unnecessary_addr_size \
+       -Wno-graph_child_address
+
 $(obj)/processed-schema-examples.yaml: $(DT_DOCS) FORCE
        $(call if_changed,mk_schema)
 endif