[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 23/33] hw/ppc/ppc4xx_pci: Use ARRAY_SIZE() instead of magic value
From: |
David Gibson |
Subject: |
[PULL 23/33] hw/ppc/ppc4xx_pci: Use ARRAY_SIZE() instead of magic value |
Date: |
Tue, 8 Sep 2020 15:19:43 +1000 |
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Replace the magic '4' by ARRAY_SIZE(s->irq) which is more explicit.
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200901104043.91383-4-f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
hw/ppc/ppc4xx_pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c
index 3ea47df71f..cd3f192a13 100644
--- a/hw/ppc/ppc4xx_pci.c
+++ b/hw/ppc/ppc4xx_pci.c
@@ -320,7 +320,8 @@ static void ppc4xx_pcihost_realize(DeviceState *dev, Error
**errp)
b = pci_register_root_bus(dev, NULL, ppc4xx_pci_set_irq,
ppc4xx_pci_map_irq, s->irq, get_system_memory(),
- get_system_io(), 0, 4, TYPE_PCI_BUS);
+ get_system_io(), 0, ARRAY_SIZE(s->irq),
+ TYPE_PCI_BUS);
h->bus = b;
pci_create_simple(b, 0, "ppc4xx-host-bridge");
--
2.26.2
- [PULL 13/33] spapr, spapr_nvdimm: fold NVDIMM validation in the same place, (continued)
- [PULL 13/33] spapr, spapr_nvdimm: fold NVDIMM validation in the same place, David Gibson, 2020/09/08
- [PULL 15/33] target/arm: Move start-powered-off property to generic CPUState, David Gibson, 2020/09/08
- [PULL 16/33] target/arm: Move setting of CPU halted state to generic code, David Gibson, 2020/09/08
- [PULL 19/33] mips/cps: Use start-powered-off CPUState property, David Gibson, 2020/09/08
- [PULL 24/33] hw/ppc/ppc4xx_pci: Replace pointless warning by assert(), David Gibson, 2020/09/08
- [PULL 20/33] sparc/sun4m: Don't set cs->halted = 0 in main_cpu_reset(), David Gibson, 2020/09/08
- [PULL 22/33] target/s390x: Use start-powered-off CPUState property, David Gibson, 2020/09/08
- [PULL 18/33] ppc/e500: Use start-powered-off CPUState property, David Gibson, 2020/09/08
- [PULL 17/33] ppc/spapr: Use start-powered-off CPUState property, David Gibson, 2020/09/08
- [PULL 21/33] sparc/sun4m: Use start-powered-off CPUState property, David Gibson, 2020/09/08
- [PULL 23/33] hw/ppc/ppc4xx_pci: Use ARRAY_SIZE() instead of magic value,
David Gibson <=
- [PULL 25/33] ppc: introducing spapr_numa.c NUMA code helper, David Gibson, 2020/09/08
- [PULL 26/33] ppc/spapr_nvdimm: turn spapr_dt_nvdimm() static, David Gibson, 2020/09/08
- [PULL 28/33] spapr, spapr_numa: handle vcpu ibm,associativity, David Gibson, 2020/09/08
- [PULL 29/33] spapr, spapr_numa: move lookup-arrays handling to spapr_numa.c, David Gibson, 2020/09/08
- [PULL 30/33] spapr_numa: move NVLink2 associativity handling to spapr_numa.c, David Gibson, 2020/09/08
- [PULL 31/33] spapr: move h_home_node_associativity to spapr_numa.c, David Gibson, 2020/09/08
- [PULL 27/33] spapr: introduce SpaprMachineState::numa_assoc_array, David Gibson, 2020/09/08
- [PULL 32/33] spapr_numa: create a vcpu associativity helper, David Gibson, 2020/09/08
- [PULL 33/33] spapr_numa: use spapr_numa_get_vcpu_assoc() in home_node hcall, David Gibson, 2020/09/08
- Re: [PULL 00/33] ppc-for-5.2 queue 20200908, Peter Maydell, 2020/09/08