[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 25/26] hw/vfio/platform: Let vfio_start_eventfd_injection() ta
From: |
Bernhard Beschow |
Subject: |
[PATCH v4 25/26] hw/vfio/platform: Let vfio_start_eventfd_injection() take VFIOPlatformDevice pointer |
Date: |
Sun, 3 Nov 2024 14:34:11 +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 v4 16/26] hw/net/fsl_etsec/etsec: Prefer DEFINE_TYPES() macro, (continued)
- [PATCH v4 16/26] hw/net/fsl_etsec/etsec: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/03
- [PATCH v4 17/26] hw/gpio/mpc8xxx: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/03
- [PATCH v4 20/26] hw/sd/sdhci: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/03
- [PATCH v4 18/26] hw/ppc/mpc8544_guts: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/03
- [PATCH v4 19/26] hw/intc: Guard openpic_kvm.c by dedicated OPENPIC_KVM Kconfig switch, Bernhard Beschow, 2024/11/03
- [PATCH v4 21/26] hw/block/pflash_cfi01: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/03
- [PATCH v4 23/26] hw/rtc/ds1338: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/03
- [PATCH v4 26/26] MAINTAINERS: Add hw/gpio/gpio_pwr.c, Bernhard Beschow, 2024/11/03
- [PATCH v4 22/26] hw/i2c/smbus_eeprom: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/03
- [PATCH v4 25/26] hw/vfio/platform: Let vfio_start_eventfd_injection() take VFIOPlatformDevice pointer,
Bernhard Beschow <=
- [PATCH v4 24/26] hw/usb/hcd-ehci-sysbus: Prefer DEFINE_TYPES() macro, Bernhard Beschow, 2024/11/03
- Re: [PATCH v4 00/26] E500 Cleanup, Philippe Mathieu-Daudé, 2024/11/05