From: tip-bot for Leo Yan <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: namhyung@kernel.org, leo.yan@linaro.org,
linux-kernel@vger.kernel.org, acme@redhat.com,
alexander.shishkin@linux.intel.com, tglx@linutronix.de,
mingo@kernel.org, hpa@zytor.com, peterz@infradead.org,
jolsa@redhat.com
Subject: [tip:perf/core] perf symbols: Remove unused variable 'err'
Date: Mon, 17 Jun 2019 11:57:48 -0700 [thread overview]
Message-ID: <tip-e5f177a578edf4501d0758bfa922cd0b0f9d0e9d@git.kernel.org> (raw)
In-Reply-To: <20190530093801.20510-1-leo.yan@linaro.org>
Commit-ID: e5f177a578edf4501d0758bfa922cd0b0f9d0e9d
Gitweb: https://git.kernel.org/tip/e5f177a578edf4501d0758bfa922cd0b0f9d0e9d
Author: Leo Yan <leo.yan@linaro.org>
AuthorDate: Thu, 30 May 2019 17:38:01 +0800
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 5 Jun 2019 09:47:54 -0300
perf symbols: Remove unused variable 'err'
Variable 'err' is defined but never used in function symsrc__init(),
remove it and directly return -1 at the end of the function.
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20190530093801.20510-1-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/symbol-elf.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 4ad106a5f2c0..fdc5bd7dbb90 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -699,7 +699,6 @@ bool __weak elf__needs_adjust_symbols(GElf_Ehdr ehdr)
int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name,
enum dso_binary_type type)
{
- int err = -1;
GElf_Ehdr ehdr;
Elf *elf;
int fd;
@@ -793,7 +792,7 @@ out_elf_end:
elf_end(elf);
out_close:
close(fd);
- return err;
+ return -1;
}
/**
prev parent reply other threads:[~2019-06-17 18:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-30 9:38 [PATCH] perf symbols: Remove unused variable 'err' Leo Yan
2019-05-30 12:43 ` Arnaldo Carvalho de Melo
2019-05-30 12:58 ` Leo Yan
2019-06-17 18:57 ` tip-bot for Leo Yan [this message]
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=tip-e5f177a578edf4501d0758bfa922cd0b0f9d0e9d@git.kernel.org \
--to=tipbot@zytor.com \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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).