diff mbox series

[v2,1/4] kbuild: Move dtc graph_child_address warning to W=2

Message ID 20231122-dtc-warnings-v2-1-bd4087325392@kernel.org
State New
Headers show
Series kbuild: Per arch/platform dtc warning levels | expand

Commit Message

Rob Herring (Arm) Nov. 22, 2023, 10:12 p.m. UTC
There are cases where having a single child node with a unit-address is
valid. For example, other child nodes may be optional or added via a
DT overlay. This hasn't mattered until now, but as platforms become
free of W=1 warnings, we want to enable W=1 by default on a per
platform basis. So move the warning to W=2.

In the process, the logic can be reworked a bit to avoid specifying a
given warning in multiple places.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 scripts/Makefile.lib | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 68d0134bdbf9..a67f781ae8ee 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -340,8 +340,6 @@  quiet_cmd_gzip = GZIP    $@
 # DTC
 # ---------------------------------------------------------------------------
 DTC ?= $(objtree)/scripts/dtc/dtc
-DTC_FLAGS += -Wno-interrupt_provider \
-	-Wno-unique_unit_address
 
 # Disable noisy checks by default
 ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),)
@@ -357,9 +355,11 @@  endif
 
 ifneq ($(findstring 2,$(KBUILD_EXTRA_WARN)),)
 DTC_FLAGS += -Wnode_name_chars_strict \
-	-Wproperty_name_chars_strict \
-	-Winterrupt_provider \
-	-Wunique_unit_address
+	-Wproperty_name_chars_strict
+else
+DTC_FLAGS += -Wno-interrupt_provider \
+	-Wno-unique_unit_address \
+	-Wno-graph_child_address
 endif
 
 DTC_FLAGS += $(DTC_FLAGS_$(basetarget))