mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
x86/events: 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
bf7f33aada
commit
163d9808b9
|
|
@ -137,7 +137,7 @@ static ssize_t _iommu_cpumask_show(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
return cpumap_print_to_pagebuf(true, buf, &iommu_cpumask);
|
||||
return sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(&iommu_cpumask));
|
||||
}
|
||||
static DEVICE_ATTR(cpumask, S_IRUGO, _iommu_cpumask_show, NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ static void pmu_event_read(struct perf_event *event)
|
|||
static ssize_t
|
||||
get_attr_cpumask(struct device *dev, struct device_attribute *attr, char *buf)
|
||||
{
|
||||
return cpumap_print_to_pagebuf(true, buf, &cpu_mask);
|
||||
return sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(&cpu_mask));
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(cpumask, S_IRUGO, get_attr_cpumask, NULL);
|
||||
|
|
|
|||
|
|
@ -322,7 +322,7 @@ static ssize_t amd_uncore_attr_show_cpumask(struct device *dev,
|
|||
struct pmu *ptr = dev_get_drvdata(dev);
|
||||
struct amd_uncore_pmu *pmu = container_of(ptr, struct amd_uncore_pmu, pmu);
|
||||
|
||||
return cpumap_print_to_pagebuf(true, buf, &pmu->active_mask);
|
||||
return sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(&pmu->active_mask));
|
||||
}
|
||||
static DEVICE_ATTR(cpumask, S_IRUGO, amd_uncore_attr_show_cpumask, NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -7564,7 +7564,7 @@ static ssize_t intel_hybrid_get_attr_cpus(struct device *dev,
|
|||
struct x86_hybrid_pmu *pmu =
|
||||
container_of(dev_get_drvdata(dev), struct x86_hybrid_pmu, pmu);
|
||||
|
||||
return cpumap_print_to_pagebuf(true, buf, &pmu->supported_cpus);
|
||||
return sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(&pmu->supported_cpus));
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(cpus, S_IRUGO, intel_hybrid_get_attr_cpus, NULL);
|
||||
|
|
|
|||
|
|
@ -861,7 +861,7 @@ static ssize_t uncore_get_attr_cpumask(struct device *dev,
|
|||
{
|
||||
struct intel_uncore_pmu *pmu = container_of(dev_get_drvdata(dev), struct intel_uncore_pmu, pmu);
|
||||
|
||||
return cpumap_print_to_pagebuf(true, buf, &pmu->cpu_mask);
|
||||
return sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(&pmu->cpu_mask));
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(cpumask, S_IRUGO, uncore_get_attr_cpumask, NULL);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user