From d37f938821d7d9d3feb48225f88820102d90bc05 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roger=20Pau=20Monn=C3=A9?= Date: Fri, 17 Feb 2017 16:08:37 +0100 Subject: [PATCH] x86/vmx: fix compilation after 997382 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 997382 introduced the following errors: intr.c:342:46: error: address of array 'vlapic->regs->data' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] if ( vlapic && vlapic->regs->data ) ~~ ~~~~~~~~~~~~~~^~~~ intr.c:352:42: error: address of array 'pi_desc->pir' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] if ( pi_desc && pi_desc->pir ) ~~ ~~~~~~~~~^~~ Both of those checks are done against static arrays, which doesn't seem to make much sense, so just remove them. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- xen/arch/x86/hvm/vmx/intr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/intr.c b/xen/arch/x86/hvm/vmx/intr.c index 41a14d61cf..1eb9f38675 100644 --- a/xen/arch/x86/hvm/vmx/intr.c +++ b/xen/arch/x86/hvm/vmx/intr.c @@ -338,7 +338,7 @@ void vmx_intr_assist(void) current, intack.source, intack.vector, pt_vector); vlapic = vcpu_vlapic(v); - if ( vlapic && vlapic->regs->data ) + if ( vlapic && vlapic->regs ) { word = (const void *)&vlapic->regs->data[APIC_IRR]; printk(XENLOG_ERR "vIRR:"); @@ -348,7 +348,7 @@ void vmx_intr_assist(void) } pi_desc = &v->arch.hvm_vmx.pi_desc; - if ( pi_desc && pi_desc->pir ) + if ( pi_desc ) { word = (const void *)&pi_desc->pir; printk(XENLOG_ERR " PIR:"); -- 2.30.2