From d0724961552f2b7da89e4b822b985f3c9fd13b79 Mon Sep 17 00:00:00 2001 From: Wang Long Date: Thu, 26 Feb 2015 03:28:25 +0000 Subject: Documentation: add print bitmap description as the commit: "lib/vsprintf: implement bitmap printing through '%*pb[l]'" add an easy way to print bitmaps. so printk-formats.txt should reflect it. Signed-off-by: Wang Long Acked-by: Tejun Heo Signed-off-by: Jonathan Corbet --- Documentation/printk-formats.txt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Documentation/printk-formats.txt') diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index 5a615c14f75d..255a061e4309 100644 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt @@ -239,6 +239,15 @@ s64 SHOULD be printed with %lld/%llx: printk("%lld", s64_var); +bitmap and its derivatives such as cpumask and nodemask: + + %*pb 0779 + %*pbl 0,3-6,8-10 + + For printing bitmap and its derivatives such as cpumask and nodemask, + %*pb output the bitmap with field width as the number of bits and %*pbl + output the bitmap as range list with field width as the number of bits. + If 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. -- cgit v1.2.3-59-g8ed1b From d181b71c3ef4f9b5edaf61125715d697540eca62 Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Tue, 24 Feb 2015 15:26:06 +0100 Subject: doc: printk-formats: Fix %pU description The documentation and the code disagrees; fix the former. Signed-off-by: Rasmus Villemoes Signed-off-by: Jonathan Corbet --- Documentation/printk-formats.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/printk-formats.txt') diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index 255a061e4309..87f10424bb28 100644 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt @@ -204,7 +204,7 @@ UUID/GUID addresses: lower ('l') or upper case ('L') hex characters - and big endian order in lower ('b') or upper case ('B') hex characters. - Where no additional specifiers are used the default little endian + Where no additional specifiers are used the default big endian order with lower case hex characters will be printed. dentry names: -- cgit v1.2.3-59-g8ed1b