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

From: Rafael J. Wysocki

Date: Mon Jun 01 2026 - 14:04:59 EST


On Thu, May 28, 2026 at 8:37 PM Yury Norov <ynorov@xxxxxxxxxx> 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@xxxxxxxxxx>
> ---
> 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!