summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/perf/util/cpumap.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c
index 072831f0cad4..7008705d745c 100644
--- a/tools/perf/util/cpumap.c
+++ b/tools/perf/util/cpumap.c
@@ -163,13 +163,8 @@ struct perf_cpu_map *perf_cpu_map__empty_new(int nr)
struct perf_cpu_map *cpus = perf_cpu_map__alloc(nr);
if (cpus != NULL) {
- int i;
-
- cpus->nr = nr;
- for (i = 0; i < nr; i++)
+ for (int i = 0; i < nr; i++)
cpus->map[i].cpu = -1;
-
- refcount_set(&cpus->refcnt, 1);
}
return cpus;