[U-Boot] [PATCH 5/7] Replace "llx" with PRIx64 to fix warnings on sandbox (MAD)

Simon Glass sjg at chromium.org
Tue Dec 23 05:47:46 CET 2014


Hi Masahiro,

On 22 December 2014 at 03:16, Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:
> These must be fixed to fix sandbox at least.
> (Horrible things are happening on the other boards, of course.)
>
> If we include <stdint.h>, we do not know 64bit-types are defined
> as "unsigned long long" or "unsigned long".
> (As for my 64bit GCC, __UINT64_TYPE__ is "long unsigned int")
>
> We cannot hard-code "%llx" in printf() or friends anymore.
> We must always use PRIx64 etc.
>
> (As Documentation/printk-formats.txt clearly says, Linux Kernel
> always uses "%llx" to print 64bit variables, and U-Boot used to do that.
> But we lost the convenience by commit 0d296cc and commit 4166ecb24)

I think we should study how the kernel does this - basically by
redefining __UIN32_TYPE__, etc. as far as I understand it. From what
you are saying, I gather that the PRI defines will then not be needed.

>
> Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>
> Cc: Gabe Black <gabeblack at chromium.org>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Bill Richardson <wfrichar at google.com>
> Cc: Tom Rini <trini at ti.com>
> ---

Regards,
Simon


More information about the U-Boot mailing list