* [Qemu-devel] [PATCH] arm_gicv3_kvm: Fix compile warning
@ 2017-08-29 17:32 Pranith Kumar
2017-08-29 17:56 ` Pranith Kumar
2017-08-31 16:56 ` Pranith Kumar
0 siblings, 2 replies; 4+ messages in thread
From: Pranith Kumar @ 2017-08-29 17:32 UTC (permalink / raw)
To: Peter Maydell, open list:ARM cores, open list:All patches CC here
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 <bobby.prani@gmail.com>
---
hw/intc/arm_gicv3_kvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c
index 6051c77705..481fe5405a 100644
--- a/hw/intc/arm_gicv3_kvm.c
+++ b/hw/intc/arm_gicv3_kvm.c
@@ -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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] arm_gicv3_kvm: Fix compile warning
2017-08-29 17:32 [Qemu-devel] [PATCH] arm_gicv3_kvm: Fix compile warning Pranith Kumar
@ 2017-08-29 17:56 ` Pranith Kumar
2017-08-31 16:56 ` Pranith Kumar
1 sibling, 0 replies; 4+ messages in thread
From: Pranith Kumar @ 2017-08-29 17:56 UTC (permalink / raw)
To: Peter Maydell, open list:ARM cores, open list:All patches CC here
I should have worded the subject better. The warning is pointing to an
actual bug.
On Tue, Aug 29, 2017 at 1:32 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
> 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 <bobby.prani@gmail.com>
> ---
> hw/intc/arm_gicv3_kvm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c
> index 6051c77705..481fe5405a 100644
> --- a/hw/intc/arm_gicv3_kvm.c
> +++ b/hw/intc/arm_gicv3_kvm.c
> @@ -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
>
--
Pranith
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] arm_gicv3_kvm: Fix compile warning
2017-08-29 17:32 [Qemu-devel] [PATCH] arm_gicv3_kvm: Fix compile warning Pranith Kumar
2017-08-29 17:56 ` Pranith Kumar
@ 2017-08-31 16:56 ` Pranith Kumar
2017-09-04 11:10 ` Peter Maydell
1 sibling, 1 reply; 4+ messages in thread
From: Pranith Kumar @ 2017-08-31 16:56 UTC (permalink / raw)
To: Peter Maydell, open list:ARM cores, open list:All patches CC here
Cc: qemu-stable
CC'ing stable for 2.10.
On Tue, Aug 29, 2017 at 1:32 PM, Pranith Kumar <bobby.prani@gmail.com> wrote:
> 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 <bobby.prani@gmail.com>
> ---
> hw/intc/arm_gicv3_kvm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c
> index 6051c77705..481fe5405a 100644
> --- a/hw/intc/arm_gicv3_kvm.c
> +++ b/hw/intc/arm_gicv3_kvm.c
> @@ -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
>
--
Pranith
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] arm_gicv3_kvm: Fix compile warning
2017-08-31 16:56 ` Pranith Kumar
@ 2017-09-04 11:10 ` Peter Maydell
0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2017-09-04 11:10 UTC (permalink / raw)
To: Pranith Kumar
Cc: open list:ARM cores, open list:All patches CC here, qemu-stable
On 31 August 2017 at 17:56, Pranith Kumar <bobby.prani@gmail.com> wrote:
> CC'ing stable for 2.10.
Thanks; applied to target-arm.next (with a tweaked commit message).
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-09-04 11:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-29 17:32 [Qemu-devel] [PATCH] arm_gicv3_kvm: Fix compile warning Pranith Kumar
2017-08-29 17:56 ` Pranith Kumar
2017-08-31 16:56 ` Pranith Kumar
2017-09-04 11:10 ` Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.