qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Pranith Kumar <bobby.prani@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>,
	"open list:ARM cores" <qemu-arm@nongnu.org>,
	"open list:All patches CC here" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] arm_gicv3_kvm: Fix compile warning
Date: Tue, 29 Aug 2017 13:56:06 -0400	[thread overview]
Message-ID: <CAJhHMCAEGv6k3WNHGhm=1c9XLJKdApw3JDD3dVJ5TrZ2AQBmiA@mail.gmail.com> (raw)
In-Reply-To: <20170829173226.7625-1-bobby.prani@gmail.com>

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, &regh, 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

  reply	other threads:[~2017-08-29 17:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-29 17:32 [Qemu-devel] [PATCH] arm_gicv3_kvm: Fix compile warning Pranith Kumar
2017-08-29 17:56 ` Pranith Kumar [this message]
2017-08-31 16:56 ` Pranith Kumar
2017-09-04 11:10   ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJhHMCAEGv6k3WNHGhm=1c9XLJKdApw3JDD3dVJ5TrZ2AQBmiA@mail.gmail.com' \
    --to=bobby.prani@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).