mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/2] kbuild: don't warn about reg formatting
Date: Thu, 30 Nov 2023 08:03:20 +0100	[thread overview]
Message-ID: <20231130070320.3295372-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20231130070320.3295372-1-a.fatoum@pengutronix.de>

Overlays, especially new style ones, are prone to trigger the reg
formatting warnings if fragments add node with reg properties without
also patching the parent:

  &phy0 {
	reg = <7>;
  };

In order to add #address-cells and #size-cells, the parent would need to
be overlaid, which is a bad tradeoff as it's either redundant or it
overrides the existing cell count with the wrong ones, possibly
invalidating reg parsing for existing nodes.

Improve the situation and avoid false positives by silencing the warnings
when building device tree overlays.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 scripts/Makefile.lib | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 8aa49b1ee1b0..0b236babb275 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -371,6 +371,8 @@ ifeq ($(CONFIG_OF_OVERLAY_LIVE), y)
 DTC_FLAGS.dtb += -@
 endif
 
+DTC_FLAGS.dtbo += -Wno-avoid_default_addr_size -Wno-reg_format
+
 # Generate an assembly file to wrap the output of the device tree compiler
 quiet_cmd_dt_S_dtb = DTB     $@
 cmd_dt_S_dtb = $(srctree)/scripts/gen-dtb-s $(subst -,_,$(*F)) $< $(CONFIG_IMD) > $@
-- 
2.39.2




  reply	other threads:[~2023-11-30  7:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30  7:03 [PATCH 1/2] kbuild: don't mix overlay and normal DTC and CPP flags Ahmad Fatoum
2023-11-30  7:03 ` Ahmad Fatoum [this message]
2023-12-05  8:01 ` Sascha Hauer

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=20231130070320.3295372-2-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox