From: Eric Farman <farman@linux.ibm.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Eduardo Habkost" <eduardo@habkost.net>,
qemu-devel@nongnu.org
Cc: Richard Henderson <richard.henderson@linaro.org>,
qemu-s390x@nongnu.org,
Alex Williamson <alex.williamson@redhat.com>,
David Hildenbrand <david@redhat.com>,
Thomas Huth <thuth@redhat.com>,
Matthew Rosato <mjrosato@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Halil Pasic <pasic@linux.ibm.com>,
Ilya Leoshkevich <iii@linux.ibm.com>
Subject: Re: [PATCH v3 2/6] hw/vfio/ccw: Simplify using DEVICE() macro
Date: Mon, 13 Feb 2023 13:38:54 -0500 [thread overview]
Message-ID: <30c2a5088df9b8f27a1bf76d654212964b35b66a.camel@linux.ibm.com> (raw)
In-Reply-To: <20230213170145.45666-3-philmd@linaro.org>
On Mon, 2023-02-13 at 18:01 +0100, Philippe Mathieu-Daudé wrote:
> QOM parenthood relationship is:
>
> VFIOCCWDevice -> S390CCWDevice -> CcwDevice -> DeviceState
>
> We can directly use the QOM DEVICE() macro to get the parent object.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
> ---
> hw/vfio/ccw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/vfio/ccw.c b/hw/vfio/ccw.c
> index 0354737666..503de94ce1 100644
> --- a/hw/vfio/ccw.c
> +++ b/hw/vfio/ccw.c
> @@ -618,7 +618,7 @@ static void vfio_ccw_get_device(VFIOGroup *group,
> VFIOCCWDevice *vcdev,
> vcdev->vdev.ops = &vfio_ccw_ops;
> vcdev->vdev.type = VFIO_DEVICE_TYPE_CCW;
> vcdev->vdev.name = name;
> - vcdev->vdev.dev = &vcdev->cdev.parent_obj.parent_obj;
> + vcdev->vdev.dev = DEVICE(vcdev);
>
> return;
>
next prev parent reply other threads:[~2023-02-13 18:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 17:01 [PATCH v3 0/6] hw/vfio/ccw: hw: Use QOM macros and remove DO_UPCAST() uses Philippe Mathieu-Daudé
2023-02-13 17:01 ` [PATCH v3 1/6] hw/s390x/event-facility: Replace DO_UPCAST(SCLPEvent) by SCLP_EVENT() Philippe Mathieu-Daudé
2023-02-13 17:01 ` [PATCH v3 2/6] hw/vfio/ccw: Simplify using DEVICE() macro Philippe Mathieu-Daudé
2023-02-13 18:38 ` Eric Farman [this message]
2023-02-13 17:01 ` [PATCH v3 3/6] hw/vfio/ccw: Use intermediate S390CCWDevice variable Philippe Mathieu-Daudé
2023-02-13 18:40 ` Eric Farman
2023-02-13 17:01 ` [PATCH v3 4/6] hw/vfio/ccw: Replace DO_UPCAST(S390CCWDevice) by S390_CCW_DEVICE() Philippe Mathieu-Daudé
2023-02-13 17:05 ` Philippe Mathieu-Daudé
2023-02-16 14:18 ` Thomas Huth
2023-02-13 17:01 ` [PATCH v3 5/6] hw/vfio/ccw: Remove pointless S390CCWDevice variable Philippe Mathieu-Daudé
2023-02-13 18:40 ` Eric Farman
2023-02-13 17:01 ` [PATCH v3 6/6] hw/vfio/ccw: Replace DO_UPCAST(VFIOCCWDevice) by VFIO_CCW() Philippe Mathieu-Daudé
2023-02-27 11:15 ` [PATCH v3 0/6] hw/vfio/ccw: hw: Use QOM macros and remove DO_UPCAST() uses Philippe Mathieu-Daudé
2023-02-27 11:46 ` Thomas Huth
2023-02-27 12:30 ` 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=30c2a5088df9b8f27a1bf76d654212964b35b66a.camel@linux.ibm.com \
--to=farman@linux.ibm.com \
--cc=alex.williamson@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=eduardo@habkost.net \
--cc=iii@linux.ibm.com \
--cc=mjrosato@linux.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).