aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kiszka2018-01-26 12:18:00 -0600
committerJan Kiszka2018-01-26 12:18:00 -0600
commit83b4735e19e2057ee31816c063a0ea9b6191c076 (patch)
treec9770b1dc658e801f96b38cc247856a4a70c257f
parent9f4a52b276f2fec01bef186ce2df1e28bfc925d9 (diff)
downloadjailhouse-83b4735e19e2057ee31816c063a0ea9b6191c076.tar.gz
jailhouse-83b4735e19e2057ee31816c063a0ea9b6191c076.tar.xz
jailhouse-83b4735e19e2057ee31816c063a0ea9b6191c076.zip
arm-common: Reorder if conditions to avoid negation
Just a style thing: save one negation to improve readability. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
-rw-r--r--hypervisor/arch/arm-common/gic-v2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hypervisor/arch/arm-common/gic-v2.c b/hypervisor/arch/arm-common/gic-v2.c
index 7133ca14..3c6b237d 100644
--- a/hypervisor/arch/arm-common/gic-v2.c
+++ b/hypervisor/arch/arm-common/gic-v2.c
@@ -296,11 +296,11 @@ static int gicv2_inject_irq(struct per_cpu *cpu_data, u16 irq_id, u16 sender)
296 lr = irq_id; 296 lr = irq_id;
297 lr |= GICH_LR_PENDING_BIT; 297 lr |= GICH_LR_PENDING_BIT;
298 298
299 if (!is_sgi(irq_id)) { 299 if (is_sgi(irq_id)) {
300 lr |= (sender & 0x7) << GICH_LR_CPUID_SHIFT;
301 } else {
300 lr |= GICH_LR_HW_BIT; 302 lr |= GICH_LR_HW_BIT;
301 lr |= (u32)irq_id << GICH_LR_PHYS_ID_SHIFT; 303 lr |= (u32)irq_id << GICH_LR_PHYS_ID_SHIFT;
302 } else {
303 lr |= (sender & 0x7) << GICH_LR_CPUID_SHIFT;
304 } 304 }
305 305
306 gicv2_write_lr(first_free, lr); 306 gicv2_write_lr(first_free, lr);