From: Yury Norov Date: Thu, 28 May 2026 18:36:21 +0000 (-0400) Subject: powercap: intel_rapl: Use sysfs_emit() in cpumask_show() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=497823b493145b650ccad56dd7cf5f8237136ae2;p=thirdparty%2Flinux.git powercap: intel_rapl: Use sysfs_emit() in cpumask_show() cpumask_show() is a sysfs show callback, so use sysfs_emit() and cpumask_pr_args() to emit the mask in it. This prepares for removing cpumap_print_to_pagebuf(). Signed-off-by: Yury Norov [ rjw: Subject and changelog tweaks ] Link: https://patch.msgid.link/20260528183625.870813-15-ynorov@nvidia.com Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/powercap/intel_rapl_common.c b/drivers/powercap/intel_rapl_common.c index f8afb4461e45f..1006d183d5081 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);