qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@linux.intel.com>
To: "Eric Auger" <eric.auger@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>,
	"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: [PATCH 3/4] hw/intc/s390_flic: Consolidate the use of device_class_set_parent_realize()
Date: Thu,  1 Feb 2024 16:40:26 +0800	[thread overview]
Message-ID: <20240201084027.345459-4-zhao1.liu@linux.intel.com> (raw)
In-Reply-To: <20240201084027.345459-1-zhao1.liu@linux.intel.com>

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/intc/s390_flic_kvm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c
index 4d5cbb2a2fb6..baaa30dcb734 100644
--- a/hw/intc/s390_flic_kvm.c
+++ b/hw/intc/s390_flic_kvm.c
@@ -646,9 +646,10 @@ static void kvm_s390_flic_class_init(ObjectClass *oc, void *data)
 {
     DeviceClass *dc = DEVICE_CLASS(oc);
     S390FLICStateClass *fsc = S390_FLIC_COMMON_CLASS(oc);
+    KVMS390FLICStateClass *kfsc = KVM_S390_FLIC_CLASS(oc);
 
-    KVM_S390_FLIC_CLASS(oc)->parent_realize = dc->realize;
-    dc->realize = kvm_s390_flic_realize;
+    device_class_set_parent_realize(dc, kvm_s390_flic_realize,
+                                    &kfsc->parent_realize);
     dc->vmsd = &kvm_s390_flic_vmstate;
     dc->reset = kvm_s390_flic_reset;
     fsc->register_io_adapter = kvm_s390_register_io_adapter;
-- 
2.34.1



  parent reply	other threads:[~2024-02-01  8:29 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
2024-02-01  8:40 ` Zhao Liu [this message]
2024-02-01  8:32   ` [PATCH 3/4] hw/intc/s390_flic: " 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=20240201084027.345459-4-zhao1.liu@linux.intel.com \
    --to=zhao1.liu@linux.intel.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=thuth@redhat.com \
    --cc=zhao1.liu@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).