From: Wang Long <long.wanglong@huawei.com>
To: <tj@kernel.org>, <corbet@lwn.net>
Cc: <linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<long.wanglong@huawei.com>, <peifeiyue@huawei.com>
Subject: [PATCH] Documentation: add print bitmap description
Date: Thu, 26 Feb 2015 03:28:25 +0000 [thread overview]
Message-ID: <1424921305-93124-1-git-send-email-long.wanglong@huawei.com> (raw)
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
next reply other threads:[~2015-02-26 3:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 3:28 Wang Long [this message]
2015-02-27 12:23 ` Tejun Heo
2015-02-27 22:12 ` Jonathan Corbet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1424921305-93124-1-git-send-email-long.wanglong@huawei.com \
--to=long.wanglong@huawei.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peifeiyue@huawei.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®