All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Torgue <alexandre.torgue@foss.st.com>
To: Masahiro Yamada <masahiroy@kernel.org>,
	Michal Marek <michal.lkml@markovi.net>, <robh+dt@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-kbuild@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<alexandre.torgue@foss.st.com>
Subject: [PATCH] scripts: dtc: only show unique unit address warning for enabled nodes
Date: Fri, 21 Oct 2022 10:44:47 +0200	[thread overview]
Message-ID: <20221021084447.5550-1-alexandre.torgue@foss.st.com> (raw)

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


             reply	other threads:[~2022-10-21  8:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21  8:44 Alexandre Torgue [this message]
2022-10-21 14:25 ` [PATCH] scripts: dtc: only show unique unit address warning for enabled nodes Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221021084447.5550-1-alexandre.torgue@foss.st.com \
    --to=alexandre.torgue@foss.st.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=masahiroy@kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.