mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scripts: dtc: only show unique unit address warning for enabled nodes
@ 2022-10-21  8:44 Alexandre Torgue
  2022-10-21 14:25 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandre Torgue @ 2022-10-21  8:44 UTC (permalink / raw)
  To: Masahiro Yamada, Michal Marek, robh+dt
  Cc: linux-kernel, linux-kbuild, linux-stm32, alexandre.torgue

In some cases an hardware peripheral can be used for two exclusive usages.
For example, on STM32MP15 we have the same peripheral for I2S and SPI. We
have dedicated driver for each usage and so a dedicated device node in
devicetree.
To avoid to get useless warnings running "make W=1 dtbs", this patch adds
the "-Wunique_unit_address_if_enabled" flag for a make with W=1. In this
case we will detect a duplicate address only if both devices are
enabled in the devicetree, which is a real error case.

Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 3aa384cec76b..6f077200b967 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -344,6 +344,9 @@ DTC_FLAGS += -Wno-unit_address_vs_reg \
 	-Wno-graph_child_address \
 	-Wno-simple_bus_reg \
 	-Wno-unique_unit_address
+else
+DTC_FLAGS += -Wno-unique_unit_address \
+        -Wunique_unit_address_if_enabled
 endif
 
 ifneq ($(findstring 2,$(KBUILD_EXTRA_WARN)),)
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-21 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-21  8:44 [PATCH] scripts: dtc: only show unique unit address warning for enabled nodes Alexandre Torgue
2022-10-21 14:25 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®