2018-08-06 22:20 GMT+09:00 Andy Shevchenko <andy.shevche...@gmail.com>: > On Mon, Aug 6, 2018 at 2:47 PM, Masahiro Yamada > <yamada.masah...@socionext.com> wrote: > >> The use of PRI* makes the code super-ugly. You can simply use >> "l" for printing uintptr_t, "ll" for u64, and no modifier for u32. > > This is not always the case. I dunno what exact usage of PRIx in > U-Boot, but this is correct way for some size-variable types. > So, if U-Boot is known of not using something like off_t, then we are fine.
U-Boot uses off_t. All architectures use 'long' for off_t. It is safe to use 'l' modifier for printing off_t variables. As for Linux, only i386 use 'long long' for off_t, right? To sum up, i386: long long (64bit) other 32-bit architectures long (32bit) 64bit architectures: long (64bit) off_t is not even fixed-width type. The weirdness of __kernel_long_t is interesting, but unrelated to this patch. > In any case the commit message should better justify this part (PRIu64 > is specified in standard). > -- Best Regards Masahiro Yamada _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot