arm_gicv3_kvm: Fix compile warning
PATCH 1/1 arm_gicv3_kvm: Fix compile warning
Fix the following warning:
/home/pranith/qemu/hw/intc/arm_gicv3_kvm.c:296:17: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]
if (!c->gicr_ctlr & GICR_CTLR_ENABLE_LPIS) {
^ ~
/home/pranith/qemu/hw/intc/arm_gicv3_kvm.c:296:17: note: add parentheses after the '!' to evaluate the bitwise operator first
if (!c->gicr_ctlr & GICR_CTLR_ENABLE_LPIS) {
^
/home/pranith/qemu/hw/intc/arm_gicv3_kvm.c:296:17: note: add parentheses around left hand side expression to silence this warning
if (!c->gicr_ctlr & GICR_CTLR_ENABLE_LPIS) {
^--- hw/intc/arm_gicv3_kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/intc/arm_gicv3_kvm.c +1 -1
@@ -293,7 +293,7 @@ static void kvm_arm_gicv3_put(GICv3State *s)kvm_gicr_access (s,GICR_PROPBASER +4 , ncpu, ®h, true); reg64 = c->gicr_pendbaser; -if (!c->gicr_ctlr &GICR_CTLR_ENABLE_LPIS ) { +if (!(c->gicr_ctlr &GICR_CTLR_ENABLE_LPIS )) {/* Setting PTZ is advised if LPIs are disabled, to reduce * GIC initialization time. */
Signature · 1 line
2.11.0
I should have worded the subject better. The warning is pointing to an actual bug.
Quoted 33 lines · Pranith Kumar
Fix the following warning:
/home/pranith/qemu/hw/intc/arm_gicv3_kvm.c:296:17: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]if (!c->gicr_ctlr & GICR_CTLR_ENABLE_LPIS) { ^ ~ /home/pranith/qemu/hw/intc/arm_gicv3_kvm.c:296:17: note: add parentheses after the '!' to evaluate the bitwise operator first if (!c->gicr_ctlr & GICR_CTLR_ENABLE_LPIS) { ^ /home/pranith/qemu/hw/intc/arm_gicv3_kvm.c:296:17: note: add parentheses around left hand side expression to silence this warning if (!c->gicr_ctlr & GICR_CTLR_ENABLE_LPIS) { ^Signed-off-by Pranith Kumar <[email protected]>--- hw/intc/arm_gicv3_kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/intc/arm_gicv3_kvm.c +1
-2@@ -293,7 +293,7 @@ static void kvm_arm_gicv3_put(GICv3State *s)kvm_gicr_access (s,GICR_PROPBASER +4 , ncpu, ®h, true); reg64 = c->gicr_pendbaser; -if (!c->gicr_ctlr &GICR_CTLR_ENABLE_LPIS ) { +if (!(c->gicr_ctlr &GICR_CTLR_ENABLE_LPIS )) {/* Setting PTZ is advised if LPIs are disabled, to reduce * GIC initialization time. */ --2.11.0
Signature · 1 line
Pranith
CC'ing stable for 2.10.
Quoted 33 lines · Pranith Kumar
Fix the following warning:
/home/pranith/qemu/hw/intc/arm_gicv3_kvm.c:296:17: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]if (!c->gicr_ctlr & GICR_CTLR_ENABLE_LPIS) { ^ ~ /home/pranith/qemu/hw/intc/arm_gicv3_kvm.c:296:17: note: add parentheses after the '!' to evaluate the bitwise operator first if (!c->gicr_ctlr & GICR_CTLR_ENABLE_LPIS) { ^ /home/pranith/qemu/hw/intc/arm_gicv3_kvm.c:296:17: note: add parentheses around left hand side expression to silence this warning if (!c->gicr_ctlr & GICR_CTLR_ENABLE_LPIS) { ^Signed-off-by Pranith Kumar <[email protected]>--- hw/intc/arm_gicv3_kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/intc/arm_gicv3_kvm.c +1
-2@@ -293,7 +293,7 @@ static void kvm_arm_gicv3_put(GICv3State *s)kvm_gicr_access (s,GICR_PROPBASER +4 , ncpu, ®h, true); reg64 = c->gicr_pendbaser; -if (!c->gicr_ctlr &GICR_CTLR_ENABLE_LPIS ) { +if (!(c->gicr_ctlr &GICR_CTLR_ENABLE_LPIS )) {/* Setting PTZ is advised if LPIs are disabled, to reduce * GIC initialization time. */ --2.11.0
Signature · 1 line
Pranith
Quoted 1 line · Pranith Kumar
CC'ing stable for 2.10.
Thanks; applied to target-arm.next (with a tweaked commit message).
-- PMM