From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752245AbeAWTg2 (ORCPT ); Tue, 23 Jan 2018 14:36:28 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:45992 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752008AbeAWTg1 (ORCPT ); Tue, 23 Jan 2018 14:36:27 -0500 Date: Tue, 23 Jan 2018 13:36:25 -0600 From: Kim Phillips To: Mathieu Poirier Cc: acme@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] perf tools: Fixing uninitialised variable Message-Id: <20180123133625.33c81314ce61bc181d4de03d@arm.com> In-Reply-To: <1516659460-31733-1-git-send-email-mathieu.poirier@linaro.org> References: <1516659460-31733-1-git-send-email-mathieu.poirier@linaro.org> Organization: Arm X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 Jan 2018 15:17:40 -0700 Mathieu Poirier wrote: > When working natively on arm64 the compiler gets pesky and complains FWIW, I've only seen this on ARCH=arm64 builds with gcc versions less than 5, i.e, 4.8.5. > that variable 'i' is uninitialised, something that breaks the > compilation. It'd be nice to include the full compiler error message, to help users searching for how to fix the error. > 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 > --- Cc'ing me and adding a: Fixes: ffd3d18c20b8 ("perf tools: Add ARM Statistical Profiling Extensions (SPE) support") line would also be nice. Other than those nits: Acked-by: Kim Phillips Thanks! Kim