Thread (30 messages) 30 messages, 7 authors, 7d ago
COOLING7d

[PATCH 14/16] powercap: intel_rapl: Use sysfs_emit() for cpumask show

From: Yury Norov <hidden>
Date: 2026-05-28 18:37:29
Also in: driver-core, imx, linux-acpi, linux-amlogic, linux-arm-msm, linux-cxl, linux-fpga, linux-pci, linux-perf-users, linux-pm, linux-rdma, lkml, nvdimm
Subsystem: power management core, the rest · Maintainers: "Rafael J. Wysocki", Linus Torvalds

cpumask_show() 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 <redacted>
---
 drivers/powercap/intel_rapl_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/powercap/intel_rapl_common.c b/drivers/powercap/intel_rapl_common.c
index a8dd02dff0a0..b38d4a7799a8 100644
--- a/drivers/powercap/intel_rapl_common.c
+++ b/drivers/powercap/intel_rapl_common.c
@@ -1441,7 +1441,7 @@ static ssize_t cpumask_show(struct device *dev,
 	}
 	cpus_read_unlock();
 
-	ret = cpumap_print_to_pagebuf(true, buf, cpu_mask);
+	ret = sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(cpu_mask));
 
 	free_cpumask_var(cpu_mask);
 
-- 
2.51.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help