All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
To: Marcel Apfelbaum <marcel@redhat.com>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, armbru@redhat.com, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH] pci: fix compilation warnings
Date: Sun, 10 Apr 2016 11:28:52 +0300	[thread overview]
Message-ID: <570A0EC4.6010700@gmail.com> (raw)
In-Reply-To: <1459149797-24108-1-git-send-email-marcel@redhat.com>

On 03/28/2016 10:23 AM, Marcel Apfelbaum wrote:
> Fix 'error: shift exponent -1 is negative' warning
> by adding a corresponding assert.
>

Ping.

Thanks,
Marcel

> Reported-by: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
> ---
>   hw/pci/pci.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index e67664d..a1d41aa 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -163,11 +163,15 @@ int pci_bar(PCIDevice *d, int reg)
>
>   static inline int pci_irq_state(PCIDevice *d, int irq_num)
>   {
> +    assert(irq_num >= 0);
> +
>   	return (d->irq_state >> irq_num) & 0x1;
>   }
>
>   static inline void pci_set_irq_state(PCIDevice *d, int irq_num, int level)
>   {
> +    assert(irq_num >= 0);
> +
>   	d->irq_state &= ~(0x1 << irq_num);
>   	d->irq_state |= level << irq_num;
>   }
>

      parent reply	other threads:[~2016-04-10  8:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-28  7:23 [Qemu-devel] [PATCH] pci: fix compilation warnings Marcel Apfelbaum
2016-03-28  8:43 ` Stefan Weil
2016-03-28  9:53   ` Marcel Apfelbaum
2016-04-10  8:28 ` Marcel Apfelbaum [this message]

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=570A0EC4.6010700@gmail.com \
    --to=marcel.apfelbaum@gmail.com \
    --cc=armbru@redhat.com \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.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 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.