LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Documentation: add print bitmap description
@ 2015-02-26  3:28 Wang Long
  2015-02-27 12:23 ` Tejun Heo
  2015-02-27 22:12 ` Jonathan Corbet
  0 siblings, 2 replies; 3+ messages in thread
From: Wang Long @ 2015-02-26  3:28 UTC (permalink / raw)
  To: tj, corbet; +Cc: linux-doc, linux-kernel, long.wanglong, peifeiyue

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 <long.wanglong@huawei.com>
---
 Documentation/printk-formats.txt | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt
index 5a615c1..255a061 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 <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.
-- 
1.8.3.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Documentation: add print bitmap description
  2015-02-26  3:28 [PATCH] Documentation: add print bitmap description Wang Long
@ 2015-02-27 12:23 ` Tejun Heo
  2015-02-27 22:12 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2015-02-27 12:23 UTC (permalink / raw)
  To: Wang Long; +Cc: corbet, linux-doc, linux-kernel, peifeiyue

On Thu, Feb 26, 2015 at 03:28:25AM +0000, Wang Long wrote:
> 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 <long.wanglong@huawei.com>

Acked-by: Tejun Heo <tj@kernel.org>

Oops, sorry about missing that.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Documentation: add print bitmap description
  2015-02-26  3:28 [PATCH] Documentation: add print bitmap description Wang Long
  2015-02-27 12:23 ` Tejun Heo
@ 2015-02-27 22:12 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2015-02-27 22:12 UTC (permalink / raw)
  To: Wang Long; +Cc: tj, linux-doc, linux-kernel, peifeiyue

On Thu, 26 Feb 2015 03:28:25 +0000
Wang Long <long.wanglong@huawei.com> wrote:

> 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.

Applied to the docs tree.

Thanks,

jon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-02-27 22:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-26  3:28 [PATCH] Documentation: add print bitmap description Wang Long
2015-02-27 12:23 ` Tejun Heo
2015-02-27 22:12 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).