From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (bilbo.ozlabs.org [203.11.71.1]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 42G3SX0lP6zF3Cc for ; Thu, 20 Sep 2018 14:21:00 +1000 (AEST) In-Reply-To: <1535066799-8493-1-git-send-email-leitao@debian.org> To: Breno Leitao , linuxppc-dev@lists.ozlabs.org From: Michael Ellerman Cc: Breno Leitao , clg@kaod.org Subject: Re: [v2] powerpc/xive: Avoid unitialized variable Message-Id: <42G3SW5cPRz9sCw@ozlabs.org> Date: Thu, 20 Sep 2018 14:20:59 +1000 (AEST) List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, 2018-08-23 at 23:26:39 UTC, Breno Leitao wrote: > From: 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' > > 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 > Signed-off-by: Breno Leitao > Reviewed-by: Cédric Le Goater Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/8ac9e5bfd8cf41ef106ac97267117e cheers