[PATCH] fdt: Make fdt addr -q quieter

Marek Vasut marek.vasut at mailbox.org
Fri Mar 17 13:17:43 CET 2023


On 3/16/23 17:34, Peter Hoyes wrote:
> From: Peter Hoyes <Peter.Hoyes at arm.com>
> 
> 64597346 "fdt: Add -q option to fdt addr for distro_bootcmd" introduced
> the -q option for fdt addr, which sets the current working fdt address
> without printing any output.
> 
> baf41410 "fdt: Show a message when the working FDT changes" made the
> utility function set_working_fdt_addr (in cmd/fdt.c) output a message
> on each invocation, even if called via fdt addr -q, in which case its
> output is now slightly noisier.
> 
> To fix this, move the printf outside of set_working_fdt_addr to three
> call sites:
>   * bootm_find_images (the use case for which the additional output was
>     added in baf41410).
>   * fdt addr, but only if the 'quiet' argument is not set.
>   * fdt move.
> 
> This also has the advantage of printing the specified address instead of
> the translated address when using the sandbox.
> 
> Remove assertions from the fdt addr test case when:
>   * Calling set_working_fdt_addr directly.
>   * Calling fdt addr with the -q argument.

Why not just pass the 'quiet' flag to set_working_fdt_addr() to avoid 
duplication ?


More information about the U-Boot mailing list