perf tools: remove unneeded variable
PATCH 1/1 perf tools: remove unneeded variable
From: ran jianping <[email protected]>
Fix the following coccicheck review:
./tools/perf/util/evlist.c:1303:5-8: Unneeded variable
Remove unneeded variable used to store return value.
Reported-by Zeal Robot <[email protected]>
Signed-off-by ran jianping <[email protected]>
--- tools/perf/util/evlist.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
tools/perf/util/evlist.c +1 -2
@@ -1300,7 +1300,6 @@ static int evlist__create_syswide_maps(struct evlist *evlist) {struct perf_cpu_map *cpus;struct perf_thread_map *threads; -int err = -ENOMEM ;/* * Try reading /sys/devices/system/cpu/online to get
@@ -1325,7 +1324,7 @@ static int evlist__create_syswide_maps(struct evlist *evlist) out_put:perf_cpu_map__put (cpus); out: -return err; +return -ENOMEM ; }int evlist__open (struct evlist *evlist)
Signature · 1 line
2.25.1
Quoted 9 lines · On Mon, Nov 22, 2021 at 01:41:59AM +0000, [email protected] wrote:
From: ran jianping <[email protected]>
Fix the following coccicheck review:
./tools/perf/util/evlist.c:1303:5-8: Unneeded variableRemove unneeded variable used to store return value.
Reported-by Zeal Robot <[email protected]>Signed-off-by ran jianping <[email protected]>
Acked-by Jiri Olsa <[email protected]>
thanks,
jirka
Quoted 28 lines
--- tools/perf/util/evlist.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)tools/perf/util/evlist.c +1
-2@@ -1300,7 +1300,6 @@ static int evlist__create_syswide_maps(struct evlist *evlist) {struct perf_cpu_map *cpus;struct perf_thread_map *threads; -int err = -ENOMEM ;/* * Try reading /sys/devices/system/cpu/online to get @@ -1325,7 +1324,7 @@ static int evlist__create_syswide_maps(struct evlist *evlist) out_put:perf_cpu_map__put (cpus); out: -return err; +return -ENOMEM ; }int evlist__open (struct evlist *evlist)Signature · 1 line
2.25.1