From: Wei Liu Subject: Re: [PATCH for staging] fix compile error Date: Fri, 16 Oct 2015 11:15:50 +0100 Message-ID: <20151016101550.GL32638@zion.uk.xensource.com> References: <1444989816-13144-1-git-send-email-he.chen@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zn23H-0000Fc-Jb for xen-devel@lists.xenproject.org; Fri, 16 Oct 2015 10:15:55 +0000 Content-Disposition: inline In-Reply-To: <1444989816-13144-1-git-send-email-he.chen@linux.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: He Chen Cc: Wei Liu , Olaf Hering , Keir Fraser , Andrew Cooper , Jan Beulich , Chao Peng , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Fri, Oct 16, 2015 at 06:03:36PM +0800, He Chen wrote: > In non-debug build ASSERT_UNREACHABLE is nop and some compilers will > complain that cbm_code/cbm_data may be used uninitialized in function > psr_set_l3_cbm. Add return after ASSERT_UNREACHABLE to fix it. > > Signed-off-by: He Chen > --- > xen/arch/x86/psr.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/xen/arch/x86/psr.c b/xen/arch/x86/psr.c > index d3dec3a..c5bdfce 100644 > --- a/xen/arch/x86/psr.c > +++ b/xen/arch/x86/psr.c > @@ -477,6 +477,7 @@ int psr_set_l3_cbm(struct domain *d, unsigned int socket, > > default: > ASSERT_UNREACHABLE(); > + return; This won't work because this function should return an int. Wei. > } > > spin_lock(&info->cbm_lock); > -- > 1.9.1