From mboxrd@z Thu Jan 1 00:00:00 1970 From: He Chen Subject: [PATCH v2 for staging] fix compile error Date: Fri, 16 Oct 2015 18:16:07 +0800 Message-ID: <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 1Zn23R-0000Gv-I8 for xen-devel@lists.xenproject.org; Fri, 16 Oct 2015 10:16:05 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: 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 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); -- 1.9.1