From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v2 for staging] fix compile error Date: Fri, 16 Oct 2015 11:48:19 +0100 Message-ID: <5620D5F3.7060103@citrix.com> References: <1444990567-1890-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.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zn2a1-0003bj-8L for xen-devel@lists.xenproject.org; Fri, 16 Oct 2015 10:49:45 +0000 In-Reply-To: <1444990567-1890-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 , xen-devel@lists.xenproject.org Cc: Olaf Hering , Keir Fraser , Andrew Cooper , Jan Beulich , Chao Peng , Wei Liu List-Id: xen-devel@lists.xenproject.org Hi, "fix compiler error" is too vast. The commit title should be more meaningful. Something like: "x86: psr: fix compilation on non-debug build after 44f126d" On 16/10/15 11:16, 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 > --- > Changes in v2: > Sorry for mistake in first version of this patch. > This is the correct patch. > --- > 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 -EINVAL; > } > > spin_lock(&info->cbm_lock); > -- Julien Grall