[PATCH 2/2] dtc: libfdt: Introduce a can_assume check in fdt_check_full
Simon Glass
sjg at chromium.org
Wed May 27 06:41:26 CEST 2026
Hi Tom,
On 2026-05-26T20:19:26, Tom Rini <trini at konsulko.com> wrote:
> dtc: libfdt: Introduce a can_assume check in fdt_check_full
>
> 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 at konsulko.com>
>
> 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
> @@ -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;
Just to note that this of course affects image-fit.c too, so FITs are
no-longer validated if used in SPL. People can change the mask though.
I suggest stronger wording in the commit message since 'Take the
logic we had previously been using' reads as a no-op refactor to me.
I'm assuming that the motivation here is code size so you could
mention too.
Reviewed-by: Simon Glass <sjg at chromium.org>
Regards,
Simon
More information about the U-Boot
mailing list