From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752919AbbBZDSF (ORCPT ); Wed, 25 Feb 2015 22:18:05 -0500 Received: from szxga01-in.huawei.com ([119.145.14.64]:17292 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752583AbbBZDSD (ORCPT ); Wed, 25 Feb 2015 22:18:03 -0500 From: Wang Long To: , CC: , , , Subject: [PATCH] Documentation: add print bitmap description Date: Thu, 26 Feb 2015 03:28:25 +0000 Message-ID: <1424921305-93124-1-git-send-email-long.wanglong@huawei.com> X-Mailer: git-send-email 1.8.3.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.197.200] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 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