Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf cpumap: Remove initializations done in perf_cpu_map__alloc()

When extracting this patch from Ian's original patch I forgot to remove
the setting of ->nr and ->refcnt, no need to do those initializations
again as those are done in perf_cpu_map__alloc() already, duh.

Cc: Ian Rogers <irogers@google.com>
Fixes: 1f94479edb4decdc ("libperf: Make perf_cpu_map__alloc() available as an internal function for tools/perf to use")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+1 -6
+1 -6
tools/perf/util/cpumap.c
··· 163 163 struct perf_cpu_map *cpus = perf_cpu_map__alloc(nr); 164 164 165 165 if (cpus != NULL) { 166 - int i; 167 - 168 - cpus->nr = nr; 169 - for (i = 0; i < nr; i++) 166 + for (int i = 0; i < nr; i++) 170 167 cpus->map[i].cpu = -1; 171 - 172 - refcount_set(&cpus->refcnt, 1); 173 168 } 174 169 175 170 return cpus;