RDMA/hfi1: Use sysfs_emit() for cpumask show helper

sdma_get_cpu_to_sde_map() is used by 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@nvidia.com>
This commit is contained in:
Yury Norov 2026-07-02 11:47:21 -04:00
parent 9041d5897d
commit bf34237870

View File

@ -11,6 +11,7 @@
#include <linux/timer.h>
#include <linux/vmalloc.h>
#include <linux/highmem.h>
#include <linux/sysfs.h>
#include "hfi.h"
#include "common.h"
@ -1049,7 +1050,7 @@ ssize_t sdma_get_cpu_to_sde_map(struct sdma_engine *sde, char *buf)
if (cpumask_empty(&sde->cpu_mask))
snprintf(buf, PAGE_SIZE, "%s\n", "empty");
else
cpumap_print_to_pagebuf(true, buf, &sde->cpu_mask);
sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(&sde->cpu_mask));
mutex_unlock(&process_to_sde_mutex);
return strnlen(buf, PAGE_SIZE);
}