diff mbox

[1/2] x86/HVM: fix emulation re-issue check

Message ID 5721F4E202000078000E6AC7@prv-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich April 28, 2016, 9:32 a.m. UTC
?: has lower precedence than !=, hence parentheses are required here.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
x86/HVM: fix emulation re-issue check

?: has lower precedence than !=, hence parentheses are required here.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -134,7 +134,7 @@ static int hvmemul_do_io(
         p = vio->io_req;
 
         /* Verify the emulation request has been correctly re-issued */
-        if ( (p.type != is_mmio ? IOREQ_TYPE_COPY : IOREQ_TYPE_PIO) ||
+        if ( (p.type != (is_mmio ? IOREQ_TYPE_COPY : IOREQ_TYPE_PIO)) ||
              (p.addr != addr) ||
              (p.size != size) ||
              (p.count != *reps) ||

Comments

Andrew Cooper April 28, 2016, 9:44 a.m. UTC | #1
On 28/04/16 10:32, Jan Beulich wrote:
> ?: has lower precedence than !=, hence parentheses are required here.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff mbox

Patch

--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -134,7 +134,7 @@  static int hvmemul_do_io(
         p = vio->io_req;
 
         /* Verify the emulation request has been correctly re-issued */
-        if ( (p.type != is_mmio ? IOREQ_TYPE_COPY : IOREQ_TYPE_PIO) ||
+        if ( (p.type != (is_mmio ? IOREQ_TYPE_COPY : IOREQ_TYPE_PIO)) ||
              (p.addr != addr) ||
              (p.size != size) ||
              (p.count != *reps) ||