path: root/Documentation/printk-formats.txt
AgeCommit message (Collapse)Author
2013-04-30Merge branch 'for-linus' of ↵Linus Torvalds
git:// Pull fixup for trivial branch from Jiri Kosina: "Unfortunately I made a mistake when merging into for-linus branch, and omitted one pre-requisity patch for a few other patches (which have been Acked by the appropriate maintainers) in the series. Mea culpa maxima, sorry for that." The trivial branch added %pSR usage before actually teaching vsnprintf() about the 'R' part of %pSR. The 'R' causes the symbol translation to do a "__builtin_extract_return_addr()" before symbol lookup. That said, on most architectures __builtin_extract_return_addr() isn't likely to do anything special, so it probably is not normally noticeable. * 'for-linus' of git:// vsprintf: Add extension %pSR - print_symbol replacement
2013-04-30vsprintf: Add extension %pSR - print_symbol replacementJoe Perches
print_symbol takes a long and converts it to a function name and offset. %pS does something similar, but doesn't translate the address via __builtin_extract_return_addr. %pSR does the translation. This will enable replacing multiple calls like printk(...); printk_symbol(addr); printk("\n"); with a single non-interleavable in dmesg printk("... %pSR\n", (void *)addr); Update documentation too. Signed-off-by: Joe Perches <> Signed-off-by: Jiri Kosina <>
2013-03-08Randy has movedRandy Dunlap
Update email address and CREDITS info. is defunct. Signed-off-by: Randy Dunlap <> Cc: Harry Wei <> Cc: Keiichi KII <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
2013-02-21lib/vsprintf.c: add %pa format specifier for phys_addr_t typesStepan Moskovchenko
Add the %pa format specifier for printing a phys_addr_t type and its derivative types (such as resource_size_t), since the physical address size on some platforms can vary based on build options, regardless of the native integer type. Signed-off-by: Stepan Moskovchenko <> Cc: Rob Landley <> Cc: George Spelvin <> Cc: Andy Shevchenko <> Cc: Stephen Boyd <> Cc: Andrei Emeltchenko <> Cc: Ingo Molnar <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
2012-10-06lib/vsprintf: update documentation to cover all of %p[Mm][FR]Andy Shevchenko
Acked-by: Andrei Emeltchenko <> Signed-off-by: Andy Shevchenko <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
2012-07-30vsprintf: add support of '%*ph[CDN]'Andy Shevchenko
There are many places in the kernel where the drivers print small buffers as a hex string. This patch adds a support of the variable width buffer to print it as a hex string with a delimiter. The idea came from Pavel Roskin here: Sample output of pr_info("buf[%d:%d] %*phC\n", from, len, len, &buf[from]); could be look like this: [ 0.726130] buf[51:8] e8:16:b6:ef:e3:74:45:6e [ 0.750736] buf[59:15] 31:81:b8:3f:35:49:06:ae:df:32:06:05:4a:af:55 [ 0.757602] buf[17:5] ac:16:d5:2c:ef Signed-off-by: Andy Shevchenko <> Cc: Joe Perches <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
2012-07-30vsprintf: add %pMR for Bluetooth MAC addressAndrei Emeltchenko
Bluetooth uses mostly LE byte order which is reversed for visual interpretation. Currently in Bluetooth in use unsafe batostr function. This is a slightly modified version of Joe's patch (sent Sat, Dec 4, 2010). Signed-off-by: Andrei Emeltchenko <> Cc: Joe Perches <> Cc: Marcel Holtmann <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
2011-06-15Documentation: update printk-formats.txtAndrew Murray
This patch updates the incomplete documentation concerning the printk extended format specifiers. Signed-off-by: Andrew Murray <> Signed-off-by: Randy Dunlap <> Signed-off-by: Linus Torvalds <>
2008-11-12DOC: add printk-formats.txtRandy Dunlap
Add printk-formats.txt so that we don't have to keep fixing the same things over and over again. <wishful thinking> Signed-off-by: Randy Dunlap <> Cc: Alexey Dobriyan <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>