From: Thomas Huth <thuth@redhat.com>
To: "Zhao Liu" <zhao1.liu@linux.intel.com>,
"Eric Auger" <eric.auger@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Halil Pasic" <pasic@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"David Hildenbrand" <david@redhat.com>,
"Hervé Poussineau" <hpoussin@reactos.org>,
"BALATON Zoltan" <balaton@eik.bme.hu>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Jiaxun Yang" <jiaxun.yang@flygoat.com>
Cc: qemu-devel@nongnu.org, qemu-arm@nongnu.org,
qemu-s390x@nongnu.org, qemu-ppc@nongnu.org,
qemu-trivial@nongnu.org, Zhao Liu <zhao1.liu@intel.com>
Subject: Re: [PATCH 2/4] hw/isa/pc87312: Consolidate the use of device_class_set_parent_realize()
Date: Thu, 1 Feb 2024 09:33:24 +0100 [thread overview]
Message-ID: <9007b675-1f23-4b2a-96d5-d19d8f2874e6@redhat.com> (raw)
In-Reply-To: <20240201084027.345459-3-zhao1.liu@linux.intel.com>
On 01/02/2024 09.40, Zhao Liu wrote:
> From: Zhao Liu <zhao1.liu@intel.com>
>
> Use device_class_set_parent_realize() to set parent realize() directly.
>
> Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
> ---
> hw/isa/pc87312.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/isa/pc87312.c b/hw/isa/pc87312.c
> index ee23f3e164df..64dd17b537f2 100644
> --- a/hw/isa/pc87312.c
> +++ b/hw/isa/pc87312.c
> @@ -338,10 +338,10 @@ static void pc87312_class_init(ObjectClass *klass, void *data)
> DeviceClass *dc = DEVICE_CLASS(klass);
> ISASuperIOClass *sc = ISA_SUPERIO_CLASS(klass);
>
> - sc->parent_realize = dc->realize;
> - dc->realize = pc87312_realize;
> dc->reset = pc87312_reset;
> dc->vmsd = &vmstate_pc87312;
> + device_class_set_parent_realize(dc, pc87312_realize,
> + &sc->parent_realize);
> device_class_set_props(dc, pc87312_properties);
>
> sc->parallel = (ISASuperIOFuncs){
Reviewed-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2024-02-01 8:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 8:40 [PATCH 0/4] Consolidate the use of device_class_set_parent_realize() Zhao Liu
2024-02-01 8:40 ` [PATCH 1/4] hw/isa/vt82c686: " Zhao Liu
2024-02-01 8:33 ` Thomas Huth
2024-02-01 8:40 ` [PATCH 2/4] hw/isa/pc87312: " Zhao Liu
2024-02-01 8:33 ` Thomas Huth [this message]
2024-02-01 8:40 ` [PATCH 3/4] hw/intc/s390_flic: " Zhao Liu
2024-02-01 8:32 ` Thomas Huth
2024-02-01 8:40 ` [PATCH 4/4] hw/arm/smmuv3: " Zhao Liu
2024-02-01 8:32 ` Thomas Huth
2024-02-04 5:00 ` [PATCH 0/4] " Michael Tokarev
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=9007b675-1f23-4b2a-96d5-d19d8f2874e6@redhat.com \
--to=thuth@redhat.com \
--cc=balaton@eik.bme.hu \
--cc=borntraeger@linux.ibm.com \
--cc=david@redhat.com \
--cc=eric.auger@redhat.com \
--cc=hpoussin@reactos.org \
--cc=jiaxun.yang@flygoat.com \
--cc=pasic@linux.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=zhao1.liu@intel.com \
--cc=zhao1.liu@linux.intel.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).