From: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
To: qemu-block@nongnu.org,
"Philippe Mathieu-Daudé " <philmd@linaro.org>,
qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Hanna Reitz" <hreitz@redhat.com>, "Fam Zheng" <fam@euphon.net>,
qemu-arm@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
qemu-block@nongnu.org, "Kevin Wolf" <kwolf@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Raphael Norwitz" <raphael.norwitz@nutanix.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Alistair Francis" <alistair@alistair23.me>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Philippe Mathieu-Daudé " <philmd@linaro.org>
Subject: Re: [PATCH 2/7] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros
Date: Tue, 17 Oct 2023 20:15:40 +0300 [thread overview]
Message-ID: <2oo43.ni0pj3wuvqqh@linaro.org> (raw)
In-Reply-To: <20231017140150.44995-3-philmd@linaro.org>
On Tue, 17 Oct 2023 17:01, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>Access QOM parent with the proper QOM [VIRTIO_]DEVICE() macros.
>
>Signed-off-by: Philippe Mathieu-Daudé <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
>
>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
next prev parent reply other threads:[~2023-10-17 17:19 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 14:01 [PATCH 0/7] hw: Few more QOM/QDev cleanups Philippe Mathieu-Daudé
2023-10-17 14:01 ` [PATCH 1/7] hw/virtio/virtio-pmem: Replace impossible check by assertion Philippe Mathieu-Daudé
2023-10-17 17:20 ` Manos Pitsidianakis
2023-10-17 14:01 ` [PATCH 2/7] hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros Philippe Mathieu-Daudé
2023-10-17 17:15 ` Manos Pitsidianakis [this message]
2023-10-17 20:09 ` Mark Cave-Ayland
2023-10-17 14:01 ` [PATCH 3/7] hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro Philippe Mathieu-Daudé
2023-10-17 17:19 ` Manos Pitsidianakis
2023-10-17 20:10 ` Mark Cave-Ayland
2023-10-17 14:01 ` [PATCH 4/7] hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro Philippe Mathieu-Daudé
2023-10-17 17:19 ` Manos Pitsidianakis
2023-10-17 20:13 ` Mark Cave-Ayland
2023-10-31 13:17 ` Kevin Wolf
2023-10-31 13:21 ` Peter Maydell
2023-10-31 13:48 ` Richard W.M. Jones
2023-10-31 16:35 ` Kevin Wolf
2023-10-31 16:42 ` Kevin Wolf
2023-10-31 16:48 ` Richard W.M. Jones
2023-10-17 14:01 ` [PATCH 5/7] hw/dma: Declare link using static DEFINE_PROP_LINK() macro Philippe Mathieu-Daudé
2023-10-17 20:16 ` Mark Cave-Ayland
2023-10-17 14:01 ` [PATCH 6/7] hw/net: " Philippe Mathieu-Daudé
2023-10-17 20:17 ` Mark Cave-Ayland
2023-10-17 14:01 ` [PATCH 7/7] hw/usb: " Philippe Mathieu-Daudé
2023-10-17 20:19 ` Mark Cave-Ayland
2023-10-17 14:09 ` [PATCH 0/7] hw: Few more QOM/QDev cleanups Michael S. Tsirkin
2023-10-19 21:41 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2oo43.ni0pj3wuvqqh@linaro.org \
--to=manos.pitsidianakis@linaro.org \
--cc=alistair@alistair23.me \
--cc=edgar.iglesias@gmail.com \
--cc=fam@euphon.net \
--cc=hreitz@redhat.com \
--cc=jasowang@redhat.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=raphael.norwitz@nutanix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.