qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] hw/isa/isa-bus: Use ISA_NUM_IRQS instead of magic number
Date: Fri, 13 Dec 2019 14:22:07 +0100	[thread overview]
Message-ID: <0be14c5f-4d19-e633-8ed7-47bf99e632d9@redhat.com> (raw)
In-Reply-To: <20191213105921.9529-1-philmd@redhat.com>

On 12/13/19 11:59 AM, Philippe Mathieu-Daudé wrote:
> We have a definition for the number of ISA IRQs, use it.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>   hw/isa/isa-bus.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c
> index 388800603b..1d79ed133c 100644
> --- a/hw/isa/isa-bus.c
> +++ b/hw/isa/isa-bus.c
> @@ -85,7 +85,7 @@ void isa_bus_irqs(ISABus *bus, qemu_irq *irqs)
>   qemu_irq isa_get_irq(ISADevice *dev, int isairq)
>   {
>       assert(!dev || ISA_BUS(qdev_get_parent_bus(DEVICE(dev))) == isabus);
> -    if (isairq < 0 || isairq > 15) {
> +    if (isairq < 0 || isairq > >= ISA_NUM_IRQS) {

Oops, Pablo was quicker than patchew to notice this buggy patch =)

I messed when copy/pasting from a bigger series :/

So no need to review further.

>           hw_error("isa irq %d invalid", isairq);
>       }
>       return isabus->irqs[isairq];
> 



      reply	other threads:[~2019-12-13 21:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13 10:59 [PATCH] hw/isa/isa-bus: Use ISA_NUM_IRQS instead of magic number Philippe Mathieu-Daudé
2019-12-13 13:22 ` Philippe Mathieu-Daudé [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=0be14c5f-4d19-e633-8ed7-47bf99e632d9@redhat.com \
    --to=philmd@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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).