[PATCH v2 2/4] mkimage: define log_err and log_info

Simon Glass sjg at chromium.org
Mon May 4 14:26:31 CEST 2026


Hi Ludwig,

On 2026-04-30T12:25:59, Ludwig Nussel <ludwig.nussel at siemens.com> wrote:
> mkimage: define log_err and log_info
>
> Define log_err an log_info centrally in mkimage.h so any file used
> in this context benefits from it.
>
> Signed-off-by: Ludwig Nussel <ludwig.nussel at siemens.com>
>
> boot/image-pre-load.c | 3 ---
>  tools/mkimage.h       | 2 ++
>  2 files changed, 2 insertions(+), 3 deletions(-)

> diff --git a/tools/mkimage.h b/tools/mkimage.h
> @@ -31,6 +31,8 @@
>  #endif /* MKIMAGE_DEBUG */
>
>  #define log_debug(fmt, args...)      debug(fmt, ##args)
> +#define log_info(fmt, args...)       printf(fmt, ##args)
> +#define log_err(fmt, args...)        fprintf(stderr, fmt, ##args)

This is not purely a refactor: the previous local log_err() in
image-pre-load.c went to stdout via printf(), and you are switching it
to stderr. Makes sense, but please mention it in the commit message.

For motivation, this is preparation for patch 3, which adds log_err()
calls in image-fit-sig.c that need to compile under USE_HOSTCC. Please
say so.

The commit message has a typo: "Define log_err an log_info" — should be "and".

Reviewed-by: Simon Glass <sjg at chromium.org>

Regards,
Simon


More information about the U-Boot mailing list