Consolidate the use of device_class_set_parent_realize()
cover Consolidate the use of device_class_set_parent_realize()
From: Zhao Liu <[email protected]>
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.
Regards,
Zhao
---
Zhao Liu (4):
hw/isa/vt82c686: Consolidate the use of
device_class_set_parent_realize()
hw/isa/pc87312: Consolidate the use of
device_class_set_parent_realize()
hw/intc/s390_flic: Consolidate the use of
device_class_set_parent_realize()
hw/arm/smmuv3: Consolidate the use of
device_class_set_parent_realize()
hw/arm/smmuv3.c | 4 ++-- hw/intc/s390_flic_kvm.c | 5 +++-- hw/isa/pc87312.c | 4 ++-- hw/isa/vt82c686.c | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/4 hw/isa/vt82c686: Consolidate the use of device_class_set_parent_realize()
From: Zhao Liu <[email protected]>
Use device_class_set_parent_realize() to set parent realize() directly.
--- hw/isa/vt82c686.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/isa/vt82c686.c +2 -2
@@ -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 = {
Signature · 1 line
2.34.1
Re: [PATCH 1/4] hw/isa/vt82c686: Consolidate the use of device_class_set_parent_realize()
Quoted 14 lines · Zhao Liu
From: Zhao Liu <[email protected]>
Use
device_class_set_parent_realize()to set parentrealize()directly.Signed-off-by Zhao Liu <[email protected]>--- hw/isa/vt82c686.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/isa/vt82c686.c +0
-0
hw/isa/vt82c686.c static void via_superio_class_init(ObjectClass *klass, void *data) · line 335
Quoted 10 lines
hw/isa/vt82c686.c +2
-2@@ -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 = {
PATCH 2/4 hw/isa/pc87312: Consolidate the use of device_class_set_parent_realize()
In reply to Zhao LiuFrom: Zhao Liu <[email protected]>
Use device_class_set_parent_realize() to set parent realize() directly.
--- hw/isa/pc87312.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/isa/pc87312.c +2 -2
@@ -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 ){
Signature · 1 line
2.34.1
Re: [PATCH 2/4] hw/isa/pc87312: Consolidate the use of device_class_set_parent_realize()
Quoted 16 lines · Zhao Liu
From: Zhao Liu <[email protected]>
Use
device_class_set_parent_realize()to set parentrealize()directly.Signed-off-by Zhao Liu <[email protected]>--- hw/isa/pc87312.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/isa/pc87312.c +0
-0@@ -338,10 +338,10 @@ static void pc87312_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);ISASuperIOClass *sc =ISA_SUPERIO_CLASS (klass);
hw/isa/pc87312.c static void pc87312_class_init(ObjectClass *klass, void *data) · line 347
Quoted 10 lines
hw/isa/pc87312.c +2
-2- 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 ){
PATCH 3/4 hw/intc/s390_flic: Consolidate the use of device_class_set_parent_realize()
In reply to Zhao LiuFrom: Zhao Liu <[email protected]>
Use device_class_set_parent_realize() to set parent realize() directly.
--- hw/intc/s390_flic_kvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
hw/intc/s390_flic_kvm.c +3 -2
@@ -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;
Signature · 1 line
2.34.1
Re: [PATCH 3/4] hw/intc/s390_flic: Consolidate the use of device_class_set_parent_realize()
Quoted 16 lines · Zhao Liu
From: Zhao Liu <[email protected]>
Use
device_class_set_parent_realize()to set parentrealize()directly.Signed-off-by Zhao Liu <[email protected]>--- hw/intc/s390_flic_kvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)hw/intc/s390_flic_kvm.c +0
-0@@ -646,9 +646,10 @@ static void kvm_s390_flic_class_init(ObjectClass *oc, void *data) {DeviceClass *dc =DEVICE_CLASS (oc);
hw/intc/s390_flic_kvm.c static void kvm_s390_flic_class_init(ObjectClass *oc, void *data) · line 655
Quoted 10 lines
hw/intc/s390_flic_kvm.c +3
-2S390FLICStateClass *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;
PATCH 4/4 hw/arm/smmuv3: Consolidate the use of device_class_set_parent_realize()
In reply to Zhao LiuFrom: Zhao Liu <[email protected]>
Use device_class_set_parent_realize() to set parent realize() directly.
--- hw/arm/smmuv3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/arm/smmuv3.c +2 -2
@@ -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); }
Signature · 1 line
2.34.1
Re: [PATCH 4/4] hw/arm/smmuv3: Consolidate the use of device_class_set_parent_realize()
Quoted 14 lines · Zhao Liu
From: Zhao Liu <[email protected]>
Use
device_class_set_parent_realize()to set parentrealize()directly.Signed-off-by Zhao Liu <[email protected]>--- hw/arm/smmuv3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)hw/arm/smmuv3.c +0
-0
hw/arm/smmuv3.c static void smmuv3_class_init(ObjectClass *klass, void *data) · line 1864
Quoted 10 lines
hw/arm/smmuv3.c +2
-2@@ -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); }
Michael Tokarev
Applied[Trimming list of addresses]
01.02.2024 11:40, Zhao Liu :
Quoted 7 lines
From: Zhao Liu <[email protected]>
Hi list,
Now we already have the
device_class_set_parent_realize()to set parentrealize(), thus clean up the places where that helper was forgotten.
Applied to trivial-patches tree, thanks!
/mjt