On 4/12/20 5:29 PM, Philippe Mathieu-Daudé wrote: > Switch to using the qdev gpio API which is preferred over > qemu_allocate_irqs(). One step to eventually deprecate and > remove qemu_allocate_irqs() one day. > > Patch created mechanically using spatch with this script > inspired from commit d6ef883d9d7: > > @@ > typedef qemu_irq; > identifier irqs, handler; > expression opaque, count, i; > @@ > - qemu_irq *irqs; > ... > - irqs = qemu_allocate_irqs(handler, opaque, count); > + qdev_init_gpio_in(DEVICE(opaque), handler, count); > <+... > - irqs[i] > + qdev_get_gpio_in(DEVICE(opaque), i) > ...+> > ?- g_free(irqs); > > Inspired-by: Peter Maydell <peter.mayd...@linaro.org> > Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org> Reviewed-by: John Snow <js...@redhat.com> Acked-by: John Snow <js...@redhat.com>
- [PATCH 0/3] hw: Use qdev gpio rather than qemu_all... Philippe Mathieu-Daudé
- [PATCH-for-5.1 2/3] hw/mips/mips_int: Use qde... Philippe Mathieu-Daudé
- [PATCH-for-5.1 1/3] hw/ide/ahci: Use qdev gpi... Philippe Mathieu-Daudé
- Re: [PATCH-for-5.1 1/3] hw/ide/ahci: Use ... Philippe Mathieu-Daudé
- Re: [PATCH-for-5.1 1/3] hw/ide/ahci: Use ... Alistair Francis
- Re: [PATCH-for-5.1 1/3] hw/ide/ahci: ... BALATON Zoltan
- Re: [PATCH-for-5.1 1/3] hw/ide/ahci: Use ... John Snow
- [PATCH-for-5.0? 3/3] hw/openrisc/pic_cpu: Use... Philippe Mathieu-Daudé
- Re: [PATCH-for-5.0? 3/3] hw/openrisc/pic_... Stafford Horne
- Re: [PATCH-for-5.0? 3/3] hw/openrisc/... Philippe Mathieu-Daudé
- Re: [PATCH-for-5.0? 3/3] hw/openr... Philippe Mathieu-Daudé
- Re: [PATCH 0/3] hw: Use qdev gpio rather than... no-reply
- Re: [PATCH 0/3] hw: Use qdev gpio rather than... no-reply