aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Taylor <louis@kragniz.eu>2019-03-03 07:36:47 -0500
committerPetr Mladek <pmladek@suse.com>2019-03-04 10:39:08 -0500
commit943ca6ad81e5b37bd5d22cbab5ad06dc97fc001c (patch)
tree2f2b97084a664ed7585fe25ce58f1b2f7018016b
parente36202a844d4eff2ab07bcef998d7b4beda9761f (diff)
printk/docs: Add extra integer types to printk-formats
A few commonly used integer types were absent from this table, so add them. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Suggested-by: Nick Desaulniers <ndesaulniers@google.com> Link: http://lkml.kernel.org/r/20190303123647.22020-1-louis@kragniz.eu Cc: pmladek@suse.com Cc: geert+renesas@glider.be Cc: andriy.shevchenko@linux.intel.com Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: clang-built-linux@googlegroups.com Cc: ndesaulniers@google.com Cc: jflat@chromium.org Cc: Louis Taylor <louis@kragniz.eu> Signed-off-by: Louis Taylor <louis@kragniz.eu> [pmladek@suse.com: sorted both variants the same way by size] Signed-off-by: Petr Mladek <pmladek@suse.com>
-rw-r--r--Documentation/core-api/printk-formats.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Documentation/core-api/printk-formats.rst b/Documentation/core-api/printk-formats.rst
index ff48b55040ef..cd1b0e804b74 100644
--- a/Documentation/core-api/printk-formats.rst
+++ b/Documentation/core-api/printk-formats.rst
@@ -13,6 +13,10 @@ Integer types
13 13
14 If variable is of Type, use printk format specifier: 14 If variable is of Type, use printk format specifier:
15 ------------------------------------------------------------ 15 ------------------------------------------------------------
16 char %hhd or %hhx
17 unsigned char %hhu or %hhx
18 short int %hd or %hx
19 unsigned short int %hu or %hx
16 int %d or %x 20 int %d or %x
17 unsigned int %u or %x 21 unsigned int %u or %x
18 long %ld or %lx 22 long %ld or %lx
@@ -21,6 +25,10 @@ Integer types
21 unsigned long long %llu or %llx 25 unsigned long long %llu or %llx
22 size_t %zu or %zx 26 size_t %zu or %zx
23 ssize_t %zd or %zx 27 ssize_t %zd or %zx
28 s8 %hhd or %hhx
29 u8 %hhu or %hhx
30 s16 %hd or %hx
31 u16 %hu or %hx
24 s32 %d or %x 32 s32 %d or %x
25 u32 %u or %x 33 u32 %u or %x
26 s64 %lld or %llx 34 s64 %lld or %llx