]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - lib/bitmap.c
cpumask: factor out show_cpumap into separate helper function
authorSudeep Holla <sudeep.holla@arm.com>
Tue, 30 Sep 2014 13:48:22 +0000 (14:48 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Nov 2014 19:45:00 +0000 (11:45 -0800)
commit5aaba36318e5995e8c95d077a46d9a4d00fcc1cd
treeedf9eb1ea758b82f1f04963a0fc54fab8bc8bc50
parent0372ffb35d00288802265586a29c117911d02fb8
cpumask: factor out show_cpumap into separate helper function

Many sysfs *_show function use cpu{list,mask}_scnprintf to copy cpumap
to the buffer aligned to PAGE_SIZE, append '\n' and '\0' to return null
terminated buffer with newline.

This patch creates a new helper function cpumap_print_to_pagebuf in
cpumask.h using newly added bitmap_print_to_pagebuf and consolidates
most of those sysfs functions using the new helper function.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Suggested-by: Stephen Boyd <sboyd@codeaurora.org>
Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: x86@kernel.org
Cc: linux-acpi@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 files changed:
arch/x86/kernel/cpu/perf_event_amd_iommu.c
arch/x86/kernel/cpu/perf_event_amd_uncore.c
arch/x86/kernel/cpu/perf_event_intel_rapl.c
arch/x86/kernel/cpu/perf_event_intel_uncore.c
drivers/acpi/acpi_pad.c
drivers/base/cpu.c
drivers/base/node.c
drivers/base/topology.c
drivers/pci/pci-sysfs.c
include/linux/bitmap.h
include/linux/cpumask.h
lib/bitmap.c