public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Mathieu Poirier <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: yao.jin@linux.intel.com, acme@redhat.com, mingo@kernel.org,
	tglx@linutronix.de, linux-kernel@vger.kernel.org,
	namhyung@kernel.org, hpa@zytor.com, mathieu.poirier@linaro.org,
	alexander.shishkin@linux.intel.com, peterz@infradead.org
Subject: [tip:perf/core] perf auxtrace arm: Fixing uninitialised variable
Date: Sat, 17 Feb 2018 03:29:55 -0800	[thread overview]
Message-ID: <tip-d2785de15f1bd42d613d56bbac5a007e7293b874@git.kernel.org> (raw)
In-Reply-To: <1518467557-18505-4-git-send-email-mathieu.poirier@linaro.org>

Commit-ID:  d2785de15f1bd42d613d56bbac5a007e7293b874
Gitweb:     https://git.kernel.org/tip/d2785de15f1bd42d613d56bbac5a007e7293b874
Author:     Mathieu Poirier <mathieu.poirier@linaro.org>
AuthorDate: Mon, 12 Feb 2018 13:32:37 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 16 Feb 2018 14:55:40 -0300

perf auxtrace arm: Fixing uninitialised variable

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@lists.infradead.org
Link: http://lkml.kernel.org/r/1518467557-18505-4-git-send-email-mathieu.poirier@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 2323581..fa639e3 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;

  reply	other threads:[~2018-02-17 11:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-12 20:32 [PATCH 0/3] perf tools: Miscellaneous fix from the previous cycle Mathieu Poirier
2018-02-12 20:32 ` [PATCH 1/3] perf tools: Freeing allocated memory Mathieu Poirier
2018-02-17 11:28   ` [tip:perf/core] perf cs-etm: " tip-bot for Mathieu Poirier
2018-02-12 20:32 ` [PATCH 2/3] perf util: Use target->per_thread and target->system_wide flags Mathieu Poirier
2018-02-17 11:29   ` [tip:perf/core] perf tools: " tip-bot for Jin Yao
2018-02-12 20:32 ` [PATCH 3/3] perf tools: Fixing uninitialised variable Mathieu Poirier
2018-02-17 11:29   ` tip-bot for Mathieu Poirier [this message]
2018-02-15 14:55 ` [PATCH 0/3] perf tools: Miscellaneous fix from the previous cycle 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=tip-d2785de15f1bd42d613d56bbac5a007e7293b874@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=yao.jin@linux.intel.com \
    /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