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

"Rafael J. Wysocki" <[email protected]>
Newsgroups org.infradead.lists.linux-amlogic,dev.linux.lists.driver-core,dev.linux.lists.imx,dev.linux.lists.nvdimm,org.infradead.lists.linux-rockchip,org.kernel.vger.linux-acpi,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-cxl,org.kernel.vger.linux-fpga,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci,org.kernel.vger.linux-perf-users,org.kernel.vger.linux-pm,org.kernel.vger.linux-rdma,org.ozlabs.lists.linuxppc-dev
Message-ID <CAJZ5v0gPZL7Cmi7Sm5pVN01AG7rb8NiwWkUJ9X6gwim67EUZPQ@mail.gmail.com>
On Thu, May 28, 2026 at 8:36 PM Yury Norov <[email protected]> wrote:
>
> 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 <[email protected]>
> ---
>  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!

_______________________________________________
linux-amlogic mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-amlogic
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.