2021-04-12 09:46:33

by Jiabing Wan

[permalink] [raw]
Subject: [PATCH] perf: bench: Remove unneeded variable

Fix coccicheck warning:

tools/perf/bench/find-bit-bench.c:123:5-8:
Unneeded variable: "err". Return "0" on line 134

Signed-off-by: Wan Jiabing <[email protected]>
---
tools/perf/bench/find-bit-bench.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/bench/find-bit-bench.c b/tools/perf/bench/find-bit-bench.c
index 73b5bcc5946a..7e748a56a8ba 100644
--- a/tools/perf/bench/find-bit-bench.c
+++ b/tools/perf/bench/find-bit-bench.c
@@ -120,7 +120,7 @@ static int do_for_each_set_bit(unsigned int num_bits)

int bench_mem_find_bit(int argc, const char **argv)
{
- int err = 0, i;
+ int i;

argc = parse_options(argc, argv, options, bench_usage, 0);
if (argc) {
@@ -131,5 +131,5 @@ int bench_mem_find_bit(int argc, const char **argv)
for (i = 1; i <= 2048; i <<= 1)
do_for_each_set_bit(i);

- return err;
+ return 0;
}
--
2.30.2