[PATCH v14 05/11] log: select physical address formatting in a generic way
Simon Glass
sjg at chromium.org
Fri Jul 7 19:34:14 CEST 2023
Hi Abdellatif,
On Fri, 7 Jul 2023 at 15:44, Abdellatif El Khlifi
<abdellatif.elkhlifi at arm.com> wrote:
>
> sets the log formatting according to the platform (64-bit vs 32-bit)
>
> Signed-off-by: Abdellatif El Khlifi <abdellatif.elkhlifi at arm.com>
> Cc: Simon Glass <sjg at chromium.org>
> ---
> include/log.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/include/log.h b/include/log.h
> index 3bab40b617..689cef905b 100644
> --- a/include/log.h
> +++ b/include/log.h
> @@ -686,4 +686,12 @@ static inline int log_get_default_format(void)
> (IS_ENABLED(CONFIG_LOGF_FUNC) ? BIT(LOGF_FUNC) : 0);
> }
>
> +/* Select the right physical address formatting according to the platform */
> +#ifdef CONFIG_PHYS_64BIT
> +#define PhysAddrLength "ll"
> +#else
> +#define PhysAddrLength ""
Shouldn't this be "l" ? We normally use ulong for addresses.
> +#endif
> +#define PHYS_ADDR_LN "%" PhysAddrLength "x"
> +#define PHYS_ADDR_LNU "%" PhysAddrLength "u"
> #endif
> --
> 2.25.1
>
Regards,
Simon
More information about the U-Boot
mailing list