diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2020-09-01 12:40:42 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2020-09-08 10:08:43 +1000 |
commit | f5f239315cbf047aef51022ecb083fc7662c660a (patch) | |
tree | 3a5ecf4380e1f0f1b4889c1d3c11f5bbaa07fe91 /hw/ppc/ppc4xx_pci.c | |
parent | 4192920cbc962770d54cd932748f913a7b1fe3c7 (diff) |
hw/ppc/ppc4xx_pci: Replace pointless warning by assert()
We call pci_register_root_bus() to register 4 IRQs with the
ppc4xx_pci_set_irq() handler. As it can only be called with
values in the [0-4[ range, replace the pointless warning by
an assert().
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200901104043.91383-5-f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/ppc4xx_pci.c')
-rw-r--r-- | hw/ppc/ppc4xx_pci.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c index cd3f192a13..503ef46b39 100644 --- a/hw/ppc/ppc4xx_pci.c +++ b/hw/ppc/ppc4xx_pci.c @@ -256,10 +256,7 @@ static void ppc4xx_pci_set_irq(void *opaque, int irq_num, int level) qemu_irq *pci_irqs = opaque; trace_ppc4xx_pci_set_irq(irq_num); - if (irq_num < 0) { - fprintf(stderr, "%s: PCI irq %d\n", __func__, irq_num); - return; - } + assert(irq_num >= 0); qemu_set_irq(pci_irqs[irq_num], level); } |