[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 41/46] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() mac
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 41/46] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros |
Date: |
Thu, 19 Oct 2023 23:18:06 +0200 |
Access QOM parent with the proper QOM [VIRTIO_]DEVICE() macros.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20231017140150.44995-3-philmd@linaro.org>
---
hw/block/vhost-user-blk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/block/vhost-user-blk.c b/hw/block/vhost-user-blk.c
index eecf3f7a81..4b37e26120 100644
--- a/hw/block/vhost-user-blk.c
+++ b/hw/block/vhost-user-blk.c
@@ -405,7 +405,7 @@ static void vhost_user_blk_event(void *opaque, QEMUChrEvent
event)
static int vhost_user_blk_realize_connect(VHostUserBlk *s, Error **errp)
{
- DeviceState *dev = &s->parent_obj.parent_obj;
+ DeviceState *dev = DEVICE(s);
int ret;
s->connected = false;
@@ -423,7 +423,7 @@ static int vhost_user_blk_realize_connect(VHostUserBlk *s,
Error **errp)
assert(s->connected);
ret = vhost_dev_get_config(&s->dev, (uint8_t *)&s->blkcfg,
- s->parent_obj.config_len, errp);
+ VIRTIO_DEVICE(s)->config_len, errp);
if (ret < 0) {
qemu_chr_fe_disconnect(&s->chardev);
vhost_dev_cleanup(&s->dev);
--
2.41.0
- [PULL 31/46] hw/i386/amd_iommu: Do not use SysBus API to map local MMIO region, (continued)
- [PULL 31/46] hw/i386/amd_iommu: Do not use SysBus API to map local MMIO region, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 32/46] hw/i386/intel_iommu: Do not use SysBus API to map local MMIO region, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 33/46] hw/misc/allwinner-dramc: Move sysbus_mmio_map call from init -> realize, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 34/46] hw/misc/allwinner-dramc: Do not use SysBus API to map local MMIO region, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 35/46] hw/pci-host/bonito: Do not use SysBus API to map local MMIO region, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 36/46] hw/acpi: Realize ACPI_GED sysbus device before accessing it, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 37/46] hw/arm/virt: Realize ARM_GICV2M sysbus device before accessing it, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 38/46] hw/isa: Realize ISA bridge device before accessing it, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 39/46] hw/s390x/css-bridge: Realize sysbus device before accessing it, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 40/46] hw/virtio/virtio-pmem: Replace impossible check by assertion, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 41/46] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros,
Philippe Mathieu-Daudé <=
- [PULL 42/46] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 43/46] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 44/46] hw/dma: Declare link using static DEFINE_PROP_LINK() macro, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 45/46] hw/net: Declare link using static DEFINE_PROP_LINK() macro, Philippe Mathieu-Daudé, 2023/10/19
- [PULL 46/46] ui/input: Constify QemuInputHandler structure, Philippe Mathieu-Daudé, 2023/10/19
- Re: [PULL 00/46] Misc HW/UI patches for 2023-10-19, Philippe Mathieu-Daudé, 2023/10/20
- Re: [PULL 00/46] Misc HW/UI patches for 2023-10-19, Stefan Hajnoczi, 2023/10/20