Re: [PATCH] powerpc/xive: Initialize symbol before usage

2018-08-23 Thread Cédric Le Goater
On 08/23/2018 05:24 AM, Michael Ellerman wrote: > Hi Breno, > > Breno Leitao writes: >> 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' > > Which is correct, it ca

Re: [PATCH] powerpc/xive: Initialize symbol before usage

2018-08-23 Thread Michael Ellerman
Cédric Le Goater writes: > On 08/23/2018 05:24 AM, Michael Ellerman wrote: >> Breno Leitao writes: >>> diff --git a/arch/powerpc/sysdev/xive/native.c >>> b/arch/powerpc/sysdev/xive/native.c >>> index 311185b9960a..fc56673a3c0f 100644 >>> --- a/arch/powerpc/sysdev/xive/native.c >>> +++ b/arch/pow

Re: [PATCH] powerpc/xive: Initialize symbol before usage

2018-08-22 Thread Michael Ellerman
Hi Breno, Breno Leitao writes: > 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' Which is correct, it can be used uninitialised. I'm surprised GCC doesn't warn about

[PATCH] powerpc/xive: Initialize symbol before usage

2018-08-21 Thread Breno Leitao
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' This patch simply sets chip_id initial value to 0. CC: Benjamin Herrenschmidt Signed-off-by: Breno Leitao --- arch/pow