Thread (31 messages) 31 messages, 8 authors, 2d ago

Re: [PATCH 05/16] ACPI: pad: Use sysfs_emit() for idlecpus show

From: "Rafael J. Wysocki" <rafael@kernel.org>
Date: 2026-06-01 17:45:16
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:36 PM Yury Norov [off-list ref] wrote:
quoted hunk ↗ jump to hunk
idlecpus_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/acpi/acpi_pad.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c
index ec94b09bb747..04d61a6cc95f 100644
--- a/drivers/acpi/acpi_pad.c
+++ b/drivers/acpi/acpi_pad.c
@@ -334,8 +334,8 @@ static ssize_t idlecpus_store(struct device *dev,
 static ssize_t idlecpus_show(struct device *dev,
        struct device_attribute *attr, char *buf)
 {
-       return cpumap_print_to_pagebuf(false, buf,
-                                      to_cpumask(pad_busy_cpus_bits));
+       return sysfs_emit(buf, "%*pb\n",
+                         cpumask_pr_args(to_cpumask(pad_busy_cpus_bits)));
 }

 static DEVICE_ATTR_RW(idlecpus);
--
Applied (with a tweaked subject) 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