From: acme@kernel.org (Arnaldo Carvalho de Melo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 22/41] perf auxtrace arm: Fixing uninitialised variable
Date: Fri, 16 Feb 2018 16:17:27 -0300 [thread overview]
Message-ID: <20180216191746.11095-23-acme@kernel.org> (raw)
In-Reply-To: <20180216191746.11095-1-acme@kernel.org>
From: Mathieu Poirier <mathieu.poirier@linaro.org>
When working natively on arm64 the compiler gets pesky and complains
that variable 'i' is uninitialised, something that breaks the
compilation. Here no further checks are needed since variable
'found_spe' can only be true if variable 'i' has been initialised as
part of the for loop.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: linux-arm-kernel at lists.infradead.org
Link: http://lkml.kernel.org/r/1518467557-18505-4-git-send-email-mathieu.poirier at linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/arch/arm/util/auxtrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/arch/arm/util/auxtrace.c b/tools/perf/arch/arm/util/auxtrace.c
index 2323581b157d..fa639e3e52ac 100644
--- a/tools/perf/arch/arm/util/auxtrace.c
+++ b/tools/perf/arch/arm/util/auxtrace.c
@@ -68,7 +68,7 @@ struct auxtrace_record
bool found_spe = false;
static struct perf_pmu **arm_spe_pmus = NULL;
static int nr_spes = 0;
- int i;
+ int i = 0;
if (!evlist)
return NULL;
--
2.14.3
next prev parent reply other threads:[~2018-02-16 19:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-16 19:17 [GIT PULL 00/41] perf/core improvements and fixes Arnaldo Carvalho de Melo
2018-02-16 19:17 ` [PATCH 20/41] perf cs-etm: Freeing allocated memory Arnaldo Carvalho de Melo
2018-02-16 19:17 ` [PATCH 21/41] perf tools: Use target->per_thread and target->system_wide flags Arnaldo Carvalho de Melo
2018-02-16 19:17 ` Arnaldo Carvalho de Melo [this message]
2018-02-16 19:17 ` [PATCH 23/41] perf cs-etm: Properly deal with cpu maps Arnaldo Carvalho de Melo
2018-02-16 19:17 ` [PATCH 27/41] perf cs-etm: Inject capabilitity for CoreSight traces Arnaldo Carvalho de Melo
2018-02-16 19:17 ` [PATCH 28/41] perf inject: Emit instruction records on ETM trace discontinuity Arnaldo Carvalho de Melo
2018-02-16 19:17 ` [PATCH 29/41] coresight: Update documentation for perf usage Arnaldo Carvalho de Melo
2018-02-17 10:49 ` [GIT PULL 00/41] perf/core improvements and fixes Ingo Molnar
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=20180216191746.11095-23-acme@kernel.org \
--to=acme@kernel.org \
--cc=linux-arm-kernel@lists.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).