[PATCH 06/16] cpu: Use sysfs_emit() for cpumask show callback
From: Yury Norov
Date: Thu May 28 2026 - 14:41:51 EST
show_cpus_attr() is a sysfs show callback. Use sysfs_emit() and
cpumask_pr_args() to emit the mask.
This prepares for removing cpumap_print_to_pagebuf().
Signed-off-by: Yury Norov <ynorov@xxxxxxxxxx>
---
drivers/base/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 875abdc9942e..2ebc4e87ed9f 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -218,7 +218,7 @@ static ssize_t show_cpus_attr(struct device *dev,
{
struct cpu_attr *ca = container_of(attr, struct cpu_attr, attr);
- return cpumap_print_to_pagebuf(true, buf, ca->map);
+ return sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(ca->map));
}
#define _CPU_ATTR(name, map) \
--
2.51.0