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

From: Rob Herring
Date: Wed Nov 22 2023 - 17:12:48 EST


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@xxxxxxxxxx>
---
scripts/Makefile.lib | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

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))

--
2.42.0