[PATCH] display_options: Do not use %llu in print_size

Tom Rini trini at konsulko.com
Sun Aug 22 22:54:47 CEST 2021


On Fri, Aug 06, 2021 at 12:22:58AM +0300, Matwey V. Kornilov wrote:

> tiny-printf variant doesn't know how to handle %llu format string, but both
> tiny-printf and print_size can meet in SPL when TFTP is used to obtain main
> u-boot image. This is known to lead to critical boot issue at AM335x platform
> when printf is catched in infinite loop.
> 
> To avoid such issues and make print_size function tiny-printf friendly, use %u
> instead of %luu. Note, that the size value is guaranteed to be less than 1024
> in this conditional branch, so the cast to unsigned int is safe.
> 
> Signed-off-by: Matwey V. Kornilov <matwey.kornilov at gmail.com>
> Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210822/095d34c8/attachment.sig>


More information about the U-Boot mailing list