lkml.org 
[lkml]   [2015]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/32] s390: use %*pb[l] to print bitmaps including cpumasks and nodemasks
On Sat, Jan 24, 2015 at 09:03:13AM -0500, Tejun Heo wrote:
> printk and friends can now formap 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.
>
> * Line termination only requires one extra space at the end of the
> buffer. Use PAGE_SIZE - 1 instead of PAGE_SIZE - 2 when formatting.
>
> This patch is dependent on the following two patches.
>
> lib/vsprintf: implement bitmap printing through '%*pb[l]'
> cpumask, nodemask: implement cpumask/nodemask_pr_args()
>
> Please wait till the forementioned patches are merged to mainline
> before applying to subsystem trees.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
> Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
> ---
> arch/s390/kernel/cache.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/arch/s390/kernel/cache.c b/arch/s390/kernel/cache.c
> index c0b03c2..a026911 100644
> --- a/arch/s390/kernel/cache.c
> +++ b/arch/s390/kernel/cache.c
> @@ -243,9 +243,12 @@ static ssize_t shared_cpu_map_func(struct kobject *kobj, int type, char *buf)
> int len;
>
> index = kobj_to_cache_index_dir(kobj);
> - len = type ?
> - cpulist_scnprintf(buf, PAGE_SIZE - 2, cpumask_of(index->cpu)) :
> - cpumask_scnprintf(buf, PAGE_SIZE - 2, cpumask_of(index->cpu));
> + if (type)
> + len = scnprintf(buf, PAGE_SIZE - 1, "%*pbl",
> + cpumask_pr_args(cpumask_of(index->cpu)));
> + else
> + len = scnprintf(buf, PAGE_SIZE - 1, "%*pb",
> + cpumask_pr_args(cpumask_of(index->cpu)));
> len += sprintf(&buf[len], "\n");
> return len;
> }

Hi Tejun,

this code will be removed during the next merge window, because we move
s390 to the generic cacheinfo infrastructure in drivers/base/cacheinfo.c.
(see linux-next)
So you can drop this patch.

Thanks,
Heiko



\
 
 \ /
  Last update: 2015-01-26 10:41    [W:0.197 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site