From af1861511d3853664e5362ea3d2eb14b1f8d05b4 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Mon, 23 Sep 2019 16:18:28 +1000 Subject: spapr: Simplify spapr_qirq() handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently spapr_qirq(), whic is used to find the qemu_irq for an spapr global irq number, redirects through the SpaprIrq::qirq method. But the array of qemu_irqs is allocated in the PAPR layer, not the backends, and so the method implementations all return the same thing, just differing in the preliminary checks they make. So, we can remove the method, and just implement spapr_qirq() directly, including all the relevant checks in one place. We change all those checks into assert()s as well, since a failure here indicates an error in the calling code. Signed-off-by: David Gibson Reviewed-by: Cédric Le Goater Reviewed-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daudé --- include/hw/ppc/spapr_irq.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/hw/ppc') diff --git a/include/hw/ppc/spapr_irq.h b/include/hw/ppc/spapr_irq.h index 7e26288fcd..a4e790ef60 100644 --- a/include/hw/ppc/spapr_irq.h +++ b/include/hw/ppc/spapr_irq.h @@ -44,7 +44,6 @@ typedef struct SpaprIrq { void (*init)(SpaprMachineState *spapr, Error **errp); int (*claim)(SpaprMachineState *spapr, int irq, bool lsi, Error **errp); void (*free)(SpaprMachineState *spapr, int irq, int num); - qemu_irq (*qirq)(SpaprMachineState *spapr, int irq); void (*print_info)(SpaprMachineState *spapr, Monitor *mon); void (*dt_populate)(SpaprMachineState *spapr, uint32_t nr_servers, void *fdt, uint32_t phandle); -- cgit v1.2.3