[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 24/30] hw/ppc/ppc4xx_pci: Replace pointless warning by assert()
From: |
David Gibson |
Subject: |
[PULL 24/30] hw/ppc/ppc4xx_pci: Replace pointless warning by assert() |
Date: |
Fri, 4 Sep 2020 13:47:13 +1000 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
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>
---
hw/ppc/ppc4xx_pci.c | 5 +----
1 file changed, 1 insertion(+), 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);
}
--
2.26.2
- [PULL 21/30] sparc/sun4m: Use start-powered-off CPUState property, (continued)
- [PULL 21/30] sparc/sun4m: Use start-powered-off CPUState property, David Gibson, 2020/09/03
- [PULL 16/30] target/arm: Move setting of CPU halted state to generic code, David Gibson, 2020/09/03
- [PULL 20/30] sparc/sun4m: Don't set cs->halted = 0 in main_cpu_reset(), David Gibson, 2020/09/03
- [PULL 19/30] mips/cps: Use start-powered-off CPUState property, David Gibson, 2020/09/03
- [PULL 23/30] hw/ppc/ppc4xx_pci: Use ARRAY_SIZE() instead of magic value, David Gibson, 2020/09/03
- [PULL 22/30] target/s390x: Use start-powered-off CPUState property, David Gibson, 2020/09/03
- [PULL 25/30] ppc: introducing spapr_numa.c NUMA code helper, David Gibson, 2020/09/03
- [PULL 26/30] ppc/spapr_nvdimm: turn spapr_dt_nvdimm() static, David Gibson, 2020/09/03
- [PULL 28/30] spapr, spapr_numa: handle vcpu ibm,associativity, David Gibson, 2020/09/03
- [PULL 29/30] spapr, spapr_numa: move lookup-arrays handling to spapr_numa.c, David Gibson, 2020/09/03
- [PULL 24/30] hw/ppc/ppc4xx_pci: Replace pointless warning by assert(),
David Gibson <=
- [PULL 30/30] spapr_numa: move NVLink2 associativity handling to spapr_numa.c, David Gibson, 2020/09/03
- [PULL 27/30] spapr: introduce SpaprMachineState::numa_assoc_array, David Gibson, 2020/09/03
- Re: [PULL 00/30] ppc-for-5.2 queue 20200904, Peter Maydell, 2020/09/06
- Re: [PULL 00/30] ppc-for-5.2 queue 20200904, David Gibson, 2020/09/06
- Re: [PULL 00/30] ppc-for-5.2 queue 20200904, Laurent Vivier, 2020/09/07
- Re: [PULL 00/30] ppc-for-5.2 queue 20200904, Philippe Mathieu-Daudé, 2020/09/07
- Re: [PULL 00/30] ppc-for-5.2 queue 20200904, Laurent Vivier, 2020/09/07
- Re: [PULL 00/30] ppc-for-5.2 queue 20200904, Cornelia Huck, 2020/09/07
- Re: [PULL 00/30] ppc-for-5.2 queue 20200904, Laurent Vivier, 2020/09/07
- Re: [PULL 00/30] ppc-for-5.2 queue 20200904, Laurent Vivier, 2020/09/07