From: Wan Jiabing <wanjiabing@vivo.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
Colin Ian King <colin.king@canonical.com>,
Wan Jiabing <wanjiabing@vivo.com>,
linux-kernel@vger.kernel.org
Cc: kael_w@yeah.net
Subject: [PATCH] perf: bench: Remove unneeded variable
Date: Mon, 12 Apr 2021 17:20:48 +0800 [thread overview]
Message-ID: <20210412092054.28117-1-wanjiabing@vivo.com> (raw)
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 <wanjiabing@vivo.com>
---
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
next reply other threads:[~2021-04-12 9:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-12 9:20 Wan Jiabing [this message]
[not found] <20230614033437.48549-1-luojianhong@cdjrlc.com>
2023-06-14 3:38 ` [PATCH] perf bench: remove unneeded variable baomingtong001
2023-06-14 4:43 ` Ian Rogers
2023-06-14 13:59 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210412092054.28117-1-wanjiabing@vivo.com \
--to=wanjiabing@vivo.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=colin.king@canonical.com \
--cc=irogers@google.com \
--cc=jolsa@redhat.com \
--cc=kael_w@yeah.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).