* [PATCH 1/4] hw/isa/vt82c686: Consolidate the use of device_class_set_parent_realize()
2024-02-01 8:40 [PATCH 0/4] Consolidate the use of device_class_set_parent_realize() Zhao Liu
@ 2024-02-01 8:40 ` Zhao Liu
2024-02-01 8:33 ` Thomas Huth
2024-02-01 8:40 ` [PATCH 2/4] hw/isa/pc87312: " Zhao Liu
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Zhao Liu @ 2024-02-01 8:40 UTC (permalink / raw)
To: Eric Auger, Peter Maydell, Thomas Huth, Halil Pasic,
Christian Borntraeger, David Hildenbrand, Hervé Poussineau,
BALATON Zoltan, Philippe Mathieu-Daudé, Jiaxun Yang
Cc: qemu-devel, qemu-arm, qemu-s390x, qemu-ppc, qemu-trivial,
Zhao Liu
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/vt82c686.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
index d3e0f6d01fb6..a99eae4f6333 100644
--- a/hw/isa/vt82c686.c
+++ b/hw/isa/vt82c686.c
@@ -328,8 +328,8 @@ static void via_superio_class_init(ObjectClass *klass, void *data)
DeviceClass *dc = DEVICE_CLASS(klass);
ISASuperIOClass *sc = ISA_SUPERIO_CLASS(klass);
- sc->parent_realize = dc->realize;
- dc->realize = via_superio_realize;
+ device_class_set_parent_realize(dc, via_superio_realize,
+ &sc->parent_realize);
}
static const TypeInfo via_superio_info = {
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] hw/isa/vt82c686: Consolidate the use of device_class_set_parent_realize()
2024-02-01 8:40 ` [PATCH 1/4] hw/isa/vt82c686: " Zhao Liu
@ 2024-02-01 8:33 ` Thomas Huth
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2024-02-01 8:33 UTC (permalink / raw)
To: Zhao Liu, Eric Auger, Peter Maydell, Halil Pasic,
Christian Borntraeger, David Hildenbrand, Hervé Poussineau,
BALATON Zoltan, Philippe Mathieu-Daudé, Jiaxun Yang
Cc: qemu-devel, qemu-arm, qemu-s390x, qemu-ppc, qemu-trivial,
Zhao Liu
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/vt82c686.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c
> index d3e0f6d01fb6..a99eae4f6333 100644
> --- a/hw/isa/vt82c686.c
> +++ b/hw/isa/vt82c686.c
> @@ -328,8 +328,8 @@ static void via_superio_class_init(ObjectClass *klass, void *data)
> DeviceClass *dc = DEVICE_CLASS(klass);
> ISASuperIOClass *sc = ISA_SUPERIO_CLASS(klass);
>
> - sc->parent_realize = dc->realize;
> - dc->realize = via_superio_realize;
> + device_class_set_parent_realize(dc, via_superio_realize,
> + &sc->parent_realize);
> }
>
> static const TypeInfo via_superio_info = {
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/4] hw/isa/pc87312: Consolidate the use of device_class_set_parent_realize()
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:40 ` Zhao Liu
2024-02-01 8:33 ` Thomas Huth
2024-02-01 8:40 ` [PATCH 3/4] hw/intc/s390_flic: " Zhao Liu
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Zhao Liu @ 2024-02-01 8:40 UTC (permalink / raw)
To: Eric Auger, Peter Maydell, Thomas Huth, Halil Pasic,
Christian Borntraeger, David Hildenbrand, Hervé Poussineau,
BALATON Zoltan, Philippe Mathieu-Daudé, Jiaxun Yang
Cc: qemu-devel, qemu-arm, qemu-s390x, qemu-ppc, qemu-trivial,
Zhao Liu
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){
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 2/4] hw/isa/pc87312: Consolidate the use of device_class_set_parent_realize()
2024-02-01 8:40 ` [PATCH 2/4] hw/isa/pc87312: " Zhao Liu
@ 2024-02-01 8:33 ` Thomas Huth
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2024-02-01 8:33 UTC (permalink / raw)
To: Zhao Liu, Eric Auger, Peter Maydell, Halil Pasic,
Christian Borntraeger, David Hildenbrand, Hervé Poussineau,
BALATON Zoltan, Philippe Mathieu-Daudé, Jiaxun Yang
Cc: qemu-devel, qemu-arm, qemu-s390x, qemu-ppc, qemu-trivial,
Zhao Liu
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>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 3/4] hw/intc/s390_flic: Consolidate the use of device_class_set_parent_realize()
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:40 ` [PATCH 2/4] hw/isa/pc87312: " Zhao Liu
@ 2024-02-01 8:40 ` Zhao Liu
2024-02-01 8:32 ` Thomas Huth
2024-02-01 8:40 ` [PATCH 4/4] hw/arm/smmuv3: " Zhao Liu
2024-02-04 5:00 ` [PATCH 0/4] " Michael Tokarev
4 siblings, 1 reply; 10+ messages in thread
From: Zhao Liu @ 2024-02-01 8:40 UTC (permalink / raw)
To: Eric Auger, Peter Maydell, Thomas Huth, Halil Pasic,
Christian Borntraeger, David Hildenbrand, Hervé Poussineau,
BALATON Zoltan, Philippe Mathieu-Daudé, Jiaxun Yang
Cc: qemu-devel, qemu-arm, qemu-s390x, qemu-ppc, qemu-trivial,
Zhao Liu
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
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 3/4] hw/intc/s390_flic: Consolidate the use of device_class_set_parent_realize()
2024-02-01 8:40 ` [PATCH 3/4] hw/intc/s390_flic: " Zhao Liu
@ 2024-02-01 8:32 ` Thomas Huth
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2024-02-01 8:32 UTC (permalink / raw)
To: Zhao Liu, Eric Auger, Peter Maydell, Halil Pasic,
Christian Borntraeger, David Hildenbrand, Hervé Poussineau,
BALATON Zoltan, Philippe Mathieu-Daudé, Jiaxun Yang
Cc: qemu-devel, qemu-arm, qemu-s390x, qemu-ppc, qemu-trivial,
Zhao Liu
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/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;
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 4/4] hw/arm/smmuv3: Consolidate the use of device_class_set_parent_realize()
2024-02-01 8:40 [PATCH 0/4] Consolidate the use of device_class_set_parent_realize() Zhao Liu
` (2 preceding siblings ...)
2024-02-01 8:40 ` [PATCH 3/4] hw/intc/s390_flic: " Zhao Liu
@ 2024-02-01 8:40 ` Zhao Liu
2024-02-01 8:32 ` Thomas Huth
2024-02-04 5:00 ` [PATCH 0/4] " Michael Tokarev
4 siblings, 1 reply; 10+ messages in thread
From: Zhao Liu @ 2024-02-01 8:40 UTC (permalink / raw)
To: Eric Auger, Peter Maydell, Thomas Huth, Halil Pasic,
Christian Borntraeger, David Hildenbrand, Hervé Poussineau,
BALATON Zoltan, Philippe Mathieu-Daudé, Jiaxun Yang
Cc: qemu-devel, qemu-arm, qemu-s390x, qemu-ppc, qemu-trivial,
Zhao Liu
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/arm/smmuv3.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
index 68eeef3e1d4c..b3d8642a4990 100644
--- a/hw/arm/smmuv3.c
+++ b/hw/arm/smmuv3.c
@@ -1857,8 +1857,8 @@ static void smmuv3_class_init(ObjectClass *klass, void *data)
dc->vmsd = &vmstate_smmuv3;
resettable_class_set_parent_phases(rc, NULL, smmu_reset_hold, NULL,
&c->parent_phases);
- c->parent_realize = dc->realize;
- dc->realize = smmu_realize;
+ device_class_set_parent_realize(dc, smmu_realize,
+ &c->parent_realize);
device_class_set_props(dc, smmuv3_properties);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 4/4] hw/arm/smmuv3: Consolidate the use of device_class_set_parent_realize()
2024-02-01 8:40 ` [PATCH 4/4] hw/arm/smmuv3: " Zhao Liu
@ 2024-02-01 8:32 ` Thomas Huth
0 siblings, 0 replies; 10+ messages in thread
From: Thomas Huth @ 2024-02-01 8:32 UTC (permalink / raw)
To: Zhao Liu, Eric Auger, Peter Maydell, Halil Pasic,
Christian Borntraeger, David Hildenbrand, Hervé Poussineau,
BALATON Zoltan, Philippe Mathieu-Daudé, Jiaxun Yang
Cc: qemu-devel, qemu-arm, qemu-s390x, qemu-ppc, qemu-trivial,
Zhao Liu
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/arm/smmuv3.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c
> index 68eeef3e1d4c..b3d8642a4990 100644
> --- a/hw/arm/smmuv3.c
> +++ b/hw/arm/smmuv3.c
> @@ -1857,8 +1857,8 @@ static void smmuv3_class_init(ObjectClass *klass, void *data)
> dc->vmsd = &vmstate_smmuv3;
> resettable_class_set_parent_phases(rc, NULL, smmu_reset_hold, NULL,
> &c->parent_phases);
> - c->parent_realize = dc->realize;
> - dc->realize = smmu_realize;
> + device_class_set_parent_realize(dc, smmu_realize,
> + &c->parent_realize);
> device_class_set_props(dc, smmuv3_properties);
> }
>
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/4] Consolidate the use of device_class_set_parent_realize()
2024-02-01 8:40 [PATCH 0/4] Consolidate the use of device_class_set_parent_realize() Zhao Liu
` (3 preceding siblings ...)
2024-02-01 8:40 ` [PATCH 4/4] hw/arm/smmuv3: " Zhao Liu
@ 2024-02-04 5:00 ` Michael Tokarev
4 siblings, 0 replies; 10+ messages in thread
From: Michael Tokarev @ 2024-02-04 5:00 UTC (permalink / raw)
To: Zhao Liu; +Cc: qemu-devel, QEMU Trivial
[Trimming list of addresses]
01.02.2024 11:40, Zhao Liu :
> From: Zhao Liu <zhao1.liu@intel.com>
>
> Hi list,
>
> Now we already have the device_class_set_parent_realize() to set
> parent realize(), thus clean up the places where that helper was
> forgotten.
Applied to trivial-patches tree, thanks!
/mjt
^ permalink raw reply [flat|nested] 10+ messages in thread