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

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

From: "Rafael J. Wysocki" <rafael@kernel.org>
Date: 2026-06-01 17:57:20
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

On Thu, May 28, 2026 at 8:37 PM Yury Norov [off-list ref] wrote:
quoted hunk ↗ jump to hunk
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);

--
Applied (with adjusted subject and changelog) as 7.2 material, thanks!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help