x86/vmx: fix compilation after 997382
authorRoger Pau Monné <roger.pau@citrix.com>
Fri, 17 Feb 2017 15:08:37 +0000 (16:08 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 Feb 2017 15:08:37 +0000 (16:08 +0100)
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é <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/vmx/intr.c

index 41a14d61cf6e6dbd3a025842cfb13eacefdf4a42..1eb9f386750bcdf16ef07506c064f828e51afc8c 100644 (file)
@@ -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:");