Re: [PATCH] perf tools: Fixing uninitialised variable

From: Kim Phillips
Date: Tue Jan 23 2018 - 14:36:31 EST


On Mon, 22 Jan 2018 15:17:40 -0700
Mathieu Poirier <mathieu.poirier@xxxxxxxxxx> 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 <mathieu.poirier@xxxxxxxxxx>
> ---

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 <kim.phillips@xxxxxxx>

Thanks!

Kim