mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
PCI/sysfs: Use sysfs_emit() for cpumask show callbacks
These callbacks are sysfs show paths. Use sysfs_emit() and cpumask_pr_args() to emit the masks. This prepares for removing cpumap_print_to_pagebuf(). Signed-off-by: Yury Norov <ynorov@nvidia.com>
This commit is contained in:
parent
bf34237870
commit
9e368c5421
|
|
@ -112,7 +112,8 @@ static ssize_t pci_dev_show_local_cpu(struct device *dev, bool list,
|
|||
#else
|
||||
mask = cpumask_of_pcibus(to_pci_dev(dev)->bus);
|
||||
#endif
|
||||
return cpumap_print_to_pagebuf(list, buf, mask);
|
||||
return sysfs_emit(buf, list ? "%*pbl\n" : "%*pb\n",
|
||||
cpumask_pr_args(mask));
|
||||
}
|
||||
|
||||
static ssize_t local_cpus_show(struct device *dev,
|
||||
|
|
@ -137,7 +138,7 @@ static ssize_t cpuaffinity_show(struct device *dev,
|
|||
{
|
||||
const struct cpumask *cpumask = cpumask_of_pcibus(to_pci_bus(dev));
|
||||
|
||||
return cpumap_print_to_pagebuf(false, buf, cpumask);
|
||||
return sysfs_emit(buf, "%*pb\n", cpumask_pr_args(cpumask));
|
||||
}
|
||||
static DEVICE_ATTR_RO(cpuaffinity);
|
||||
|
||||
|
|
@ -146,7 +147,7 @@ static ssize_t cpulistaffinity_show(struct device *dev,
|
|||
{
|
||||
const struct cpumask *cpumask = cpumask_of_pcibus(to_pci_bus(dev));
|
||||
|
||||
return cpumap_print_to_pagebuf(true, buf, cpumask);
|
||||
return sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(cpumask));
|
||||
}
|
||||
static DEVICE_ATTR_RO(cpulistaffinity);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user