All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
To: qemu-devel@nongnu.org, qemu-arm@nongnu.org, qemu-ppc@nongnu.org
Cc: eric.auger@redhat.com, f4bug@amsat.org,
	Mao Zhongyi <maozhongyi@cmss.chinamobile.com>,
	peter.maydell@linaro.org
Subject: [PATCH 1/2] arm/smmuv3: use helper to be more easier to understand when using abstract QOM parent functions.
Date: Sat, 12 Oct 2019 17:43:22 +0800	[thread overview]
Message-ID: <20191012094323.234788-2-maozhongyi@cmss.chinamobile.com> (raw)
In-Reply-To: <20191012094323.234788-1-maozhongyi@cmss.chinamobile.com>

Philippe introduced a series of helpers to make the
device class_init() easier to understand when a
device class change the parent hooks, device smmuv3
missed helper, so convert it.

Cc: eric.auger@redhat.com
Cc: peter.maydell@linaro.org
Cc: f4bug@amsat.org
Signed-off-by: Mao Zhongyi <maozhongyi@cmss.chinamobile.com>
---
 hw/arm/smmuv3.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
index e2fbb8357e..65b6b158e5 100644
--- a/hw/arm/smmuv3.c
+++ b/hw/arm/smmuv3.c
@@ -1465,8 +1465,7 @@ static void smmuv3_class_init(ObjectClass *klass, void *data)
 
     dc->vmsd = &vmstate_smmuv3;
     device_class_set_parent_reset(dc, smmu_reset, &c->parent_reset);
-    c->parent_realize = dc->realize;
-    dc->realize = smmu_realize;
+    device_class_set_parent_realize(dc, smmu_realize, &c->parent_realize);
 }
 
 static int smmuv3_notify_flag_changed(IOMMUMemoryRegion *iommu,
-- 
2.17.1





  reply	other threads:[~2019-10-12  9:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-12  9:43 [PATCH 0/2] use helper when using abstract QOM parent functions Mao Zhongyi
2019-10-12  9:43 ` Mao Zhongyi [this message]
2019-10-12  9:43 ` [PATCH 2/2] isa/pc87312: use helper to be more easier to understand " Mao Zhongyi
2019-10-14  9:12 ` [PATCH 0/2] use helper " Auger Eric
2020-06-18  4:27   ` maozy

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=20191012094323.234788-2-maozhongyi@cmss.chinamobile.com \
    --to=maozhongyi@cmss.chinamobile.com \
    --cc=eric.auger@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /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.