[v2] powerpc/xive: Avoid unitialized variable

Michael Ellerman patch-notifications at ellerman.id.au
Thu Sep 20 14:20:59 AEST 2018


On Thu, 2018-08-23 at 23:26:39 UTC, Breno Leitao wrote:
> From: Breno Leitao <breno.leitao at gmail.com>
> 
> Function xive_native_get_ipi() might uses chip_id without it being
> initialized.
> 
> This gives the following error on 'smatch' tool:
> 
> 	error: uninitialized symbol 'chip_id'
> 
> The suggestion is using xc->chip_id instead of consulting the OF for chip id,
> which is safe since xive_prepare_cpu() should have initialized ->chip_id by
> the time xive_native_get_ipi() is called.
> 
> CC: Cédric Le Goater <clg at kaod.org>
> Signed-off-by: Breno Leitao <leitao at debian.org>
> Reviewed-by: Cédric Le Goater <clg at kaod.org>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/8ac9e5bfd8cf41ef106ac97267117e

cheers


More information about the Linuxppc-dev mailing list