The patch titled Subject: lib/vsprintf: Move integer format types to the top has been added to the -mm tree. Its filename is lib-vsprintf-move-integer-format-types-to-the-top.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/lib-vsprintf-move-integer-format-types-to-the-top.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/lib-vsprintf-move-integer-format-types-to-the-top.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> Subject: lib/vsprintf: Move integer format types to the top Move the format types for 64-bit integers and configurable size integers to the top, so they're next to the other integer format types. While at it, add the missing format types for s32 and u32. Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> Cc: Jonathan Corbet <corbet@xxxxxxx> Cc: Mike Turquette <mturquette@xxxxxxxxxx> Cc: Stephen Boyd <sboyd@xxxxxxxxxxxxxx> Cc: Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- Documentation/printk-formats.txt | 32 +++++++++++++---------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff -puN Documentation/printk-formats.txt~lib-vsprintf-move-integer-format-types-to-the-top Documentation/printk-formats.txt --- a/Documentation/printk-formats.txt~lib-vsprintf-move-integer-format-types-to-the-top +++ a/Documentation/printk-formats.txt @@ -8,6 +8,21 @@ If variable is of Type, use printk form unsigned long long %llu or %llx size_t %zu or %zx ssize_t %zd or %zx + s32 %d or %x + u32 %u or %x + s64 %lld or %llx + u64 %llu or %llx + +If <type> is dependent on a config option for its size (e.g., sector_t, +blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a +format specifier of its largest possible type and explicitly cast to it. +Example: + + printk("test: sector number/total blocks: %llu/%llu\n", + (unsigned long long)sector, (unsigned long long)blockcount); + +Reminder: sizeof() result is of type size_t. + Raw pointer value SHOULD be printed with %p. The kernel supports the following extended format specifiers for pointer types: @@ -246,23 +261,6 @@ struct va_format: Passed by reference. -u64 SHOULD be printed with %llu/%llx: - - printk("%llu", u64_var); - -s64 SHOULD be printed with %lld/%llx: - - printk("%lld", s64_var); - -If <type> is dependent on a config option for its size (e.g., sector_t, -blkcnt_t) or is architecture-dependent for its size (e.g., tcflag_t), use a -format specifier of its largest possible type and explicitly cast to it. -Example: - - printk("test: sector number/total blocks: %llu/%llu\n", - (unsigned long long)sector, (unsigned long long)blockcount); - -Reminder: sizeof() result is of type size_t. Thank you for your cooperation and attention. _ Patches currently in -mm which might be from geert+renesas@xxxxxxxxx are lib-vsprintf-document-%p-parameters-passed-by-reference.patch lib-vsprintf-move-integer-format-types-to-the-top.patch lib-vsprintf-add-%pcnr-format-specifiers-for-clocks.patch lib-vsprintf-add-%pcnr-format-specifiers-for-clocks-fix.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html