[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH-for-5.1 1/3] hw/ide/ahci: Use qdev gpio rather than qemu_allo
From: |
John Snow |
Subject: |
Re: [PATCH-for-5.1 1/3] hw/ide/ahci: Use qdev gpio rather than qemu_allocate_irqs() |
Date: |
Fri, 17 Apr 2020 15:42:49 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
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 <address@hidden>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: John Snow <address@hidden>
Acked-by: John Snow <address@hidden>