mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
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:
parent
9041d5897d
commit
bf34237870
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user