perf pmu: perf_cpu_map__new_int to avoid parsing a string
Prefer perf_cpu_map__new_int(0) to perf_cpu_map__new("0") as it avoids
strings parsing.
Signed-off-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
pull/1354/merge
parent
af9e8d12b1
commit
f69d34e8f2
|
|
@ -120,7 +120,7 @@ static struct drm_pmu *add_drm_pmu(struct list_head *pmus, char *line, size_t li
|
|||
return NULL;
|
||||
}
|
||||
|
||||
drm->pmu.cpus = perf_cpu_map__new("0");
|
||||
drm->pmu.cpus = perf_cpu_map__new_int(0);
|
||||
if (!drm->pmu.cpus) {
|
||||
perf_pmu__delete(&drm->pmu);
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ struct perf_pmu *hwmon_pmu__new(struct list_head *pmus, const char *hwmon_dir,
|
|||
perf_pmu__delete(&hwm->pmu);
|
||||
return NULL;
|
||||
}
|
||||
hwm->pmu.cpus = perf_cpu_map__new("0");
|
||||
hwm->pmu.cpus = perf_cpu_map__new_int(0);
|
||||
if (!hwm->pmu.cpus) {
|
||||
perf_pmu__delete(&hwm->pmu);
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Reference in New Issue