Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0724961 authored by Wang Long's avatar Wang Long Committed by Jonathan Corbet
Browse files

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: default avatarWang Long <long.wanglong@huawei.com>
Acked-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent ad4a6ebe
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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.