diff options
| author | 2015-02-24 08:41:07 +0100 | |
|---|---|---|
| committer | 2015-02-24 08:41:07 +0100 | |
| commit | 2ae79026818e7d49fead82b79b1a543e3b9c8a23 (patch) | |
| tree | c7ee7bd8b37b0880918d361839fd95988fac2dac /kernel/padata.c | |
| parent | locking/rwsem: Check for active lock before bailing on spinning (diff) | |
| parent | Linux 4.0-rc1 (diff) | |
| download | linux-dev-2ae79026818e7d49fead82b79b1a543e3b9c8a23.tar.xz linux-dev-2ae79026818e7d49fead82b79b1a543e3b9c8a23.zip | |
Merge tag 'v4.0-rc1' into locking/core, to refresh the tree before merging new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/padata.c')
| -rw-r--r-- | kernel/padata.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/kernel/padata.c b/kernel/padata.c index 161402f0b517..b38bea9c466a 100644 --- a/kernel/padata.c +++ b/kernel/padata.c @@ -917,15 +917,10 @@ static ssize_t show_cpumask(struct padata_instance *pinst, else cpumask = pinst->cpumask.pcpu; - len = bitmap_scnprintf(buf, PAGE_SIZE, cpumask_bits(cpumask), - nr_cpu_ids); - if (PAGE_SIZE - len < 2) - len = -EINVAL; - else - len += sprintf(buf + len, "\n"); - + len = snprintf(buf, PAGE_SIZE, "%*pb\n", + nr_cpu_ids, cpumask_bits(cpumask)); mutex_unlock(&pinst->lock); - return len; + return len < PAGE_SIZE ? len : -EINVAL; } static ssize_t store_cpumask(struct padata_instance *pinst, |
