U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Cc: Marek Vasut <marek.vasut+renesas@mailbox.org>,
	Anton Ivanov <anton@binarly.io>
Subject: [PATCH 2/2] dtc: libfdt: Introduce a can_assume check in fdt_check_full
Date: Tue, 26 May 2026 14:19:28 -0600	[thread overview]
Message-ID: <20260526202218.4004070-3-trini@konsulko.com> (raw)
In-Reply-To: <20260526202218.4004070-1-trini@konsulko.com>

The current upstream method of having a function omit various tests is
to use the can_assume macro. Take the logic we had previously been using
and instead make it a can_assume(PERFECT) check within fdt_check_full
itself.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
I will be submitting this change upstream and will follow up if needed
here.
---
 scripts/dtc/libfdt/fdt_check.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/dtc/libfdt/fdt_check.c b/scripts/dtc/libfdt/fdt_check.c
index a21ebbc9239f..7509c11d8580 100644
--- a/scripts/dtc/libfdt/fdt_check.c
+++ b/scripts/dtc/libfdt/fdt_check.c
@@ -21,6 +21,8 @@ int fdt_check_full(const void *fdt, size_t bufsize)
 	const char *propname;
 	bool expect_end = false;
 
+	if (can_assume(PERFECT))
+		return 0;
 	if (bufsize < FDT_V1_SIZE)
 		return -FDT_ERR_TRUNCATED;
 	if (bufsize < fdt_header_size(fdt))
-- 
2.43.0


  parent reply	other threads:[~2026-05-26 20:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 20:19 [PATCH 0/2] dtc: Resync fdt_check_full function Tom Rini
2026-05-26 20:19 ` [PATCH 1/2] dtc: Resync fdt_check_full() with upstream version v1.7.2-35-g52f07dcca47c Tom Rini
2026-05-27  4:41   ` Simon Glass
2026-05-26 20:19 ` Tom Rini [this message]
2026-05-27  4:41   ` [PATCH 2/2] dtc: libfdt: Introduce a can_assume check in fdt_check_full Simon Glass
2026-05-27 14:41     ` Tom Rini
2026-05-27  9:49   ` Rasmus Villemoes
2026-05-27 14:45     ` Tom Rini
2026-06-18  1:08 ` [PATCH 0/2] dtc: Resync fdt_check_full function Tom Rini

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=20260526202218.4004070-3-trini@konsulko.com \
    --to=trini@konsulko.com \
    --cc=anton@binarly.io \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=u-boot@lists.denx.de \
    /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