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

Rafael J. Wysocki rafael at kernel.org
Mon Jun 1 10:57:04 PDT 2026


On Thu, May 28, 2026 at 8:37 PM Yury Norov <ynorov at nvidia.com> wrote:
>
> 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 <ynorov at nvidia.com>
> ---
>  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!



More information about the linux-amlogic mailing list