diff options
author | Tejun Heo <tj@kernel.org> | 2015-02-13 23:38:02 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-14 06:21:38 +0100 |
commit | 9e763e0f4f94d5f9ac8928867a4399ec3b3c7e33 (patch) | |
tree | 6dc5c9445b016d30c842357a658b754cf754a046 /mm | |
parent | slub: use %*pb[l] to print bitmaps including cpumasks and nodemasks (diff) | |
download | linux-9e763e0f4f94d5f9ac8928867a4399ec3b3c7e33.tar.xz linux-9e763e0f4f94d5f9ac8928867a4399ec3b3c7e33.zip |
mm: use %*pb[l] to print bitmaps including cpumasks and nodemasks
printk and friends can now format bitmaps using '%*pb[l]'. cpumask
and nodemask also provide cpumask_pr_args() and nodemask_pr_args()
respectively which can be used to generate the two printf arguments
necessary to format the specified cpu/nodemask.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mempolicy.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index c75f4dcec808..4721046a134a 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -2817,8 +2817,7 @@ void mpol_to_str(char *buffer, int maxlen, struct mempolicy *pol) p += snprintf(p, buffer + maxlen - p, "relative"); } - if (!nodes_empty(nodes)) { - p += snprintf(p, buffer + maxlen - p, ":"); - p += nodelist_scnprintf(p, buffer + maxlen - p, nodes); - } + if (!nodes_empty(nodes)) + p += scnprintf(p, buffer + maxlen - p, ":%*pbl", + nodemask_pr_args(&nodes)); } |