[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 25/26] hw/vfio/platform: Let vfio_start_eventfd_injection() ta
From: |
Bernhard Beschow |
Subject: |
[PATCH v3 25/26] hw/vfio/platform: Let vfio_start_eventfd_injection() take VFIOPlatformDevice pointer |
Date: |
Sat, 2 Nov 2024 14:17:14 +0100 |
Avoids one downcast, making the code more type-safe.
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
hw/vfio/platform.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/hw/vfio/platform.c b/hw/vfio/platform.c
index a85c199c76..77bbfbf62c 100644
--- a/hw/vfio/platform.c
+++ b/hw/vfio/platform.c
@@ -318,13 +318,12 @@ static void vfio_platform_eoi(VFIODevice *vbasedev)
/**
* vfio_start_eventfd_injection - starts the virtual IRQ injection using
* user-side handled eventfds
- * @sbdev: the sysbus device handle
+ * @vdev: the VFIO platform device handle
* @irq: the qemu irq handle
*/
-static void vfio_start_eventfd_injection(SysBusDevice *sbdev, qemu_irq irq)
+static void vfio_start_eventfd_injection(VFIOPlatformDevice *vdev, qemu_irq
irq)
{
- VFIOPlatformDevice *vdev = VFIO_PLATFORM_DEVICE(sbdev);
VFIOINTp *intp;
QLIST_FOREACH(intp, &vdev->intp_list, next) {
@@ -417,7 +416,7 @@ fail_vfio:
kvm_irqchip_remove_irqfd_notifier(kvm_state, intp->interrupt, irq);
abort();
fail_irqfd:
- vfio_start_eventfd_injection(sbdev, irq);
+ vfio_start_eventfd_injection(vdev, irq);
return;
}
--
2.47.0
- [PATCH v3 22/26] hw/i2c/smbus_eeprom: Prefer DEFINE_TYPES() macro, (continued)
[PATCH v3 08/26] hw/ppc/e500: Extract ppce500_ccsr.c, Bernhard Beschow, 2024/11/02
[PATCH v3 13/26] hw/pci-host/ppce500: Reuse TYPE_PPC_E500_PCI_BRIDGE define, Bernhard Beschow, 2024/11/02
[PATCH v3 18/26] hw/ppc/mpc8544_guts: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/02
[PATCH v3 19/26] hw/intc: Guard openpic_kvm.c by dedicated OPENPIC_KVM Kconfig switch, Bernhard Beschow, 2024/11/02
[PATCH v3 24/26] hw/usb/hcd-ehci-sysbus: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/02
[PATCH v3 25/26] hw/vfio/platform: Let vfio_start_eventfd_injection() take VFIOPlatformDevice pointer,
Bernhard Beschow <=