qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] hw/isa/isa-bus: Use ISA_NUM_IRQS instead of magic number


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] hw/isa/isa-bus: Use ISA_NUM_IRQS instead of magic number
Date: Fri, 13 Dec 2019 14:22:07 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

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é <address@hidden>
---
  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 via email to

[Prev in Thread] Current Thread [Next in Thread]