The QOM type of S390PVGuest is declared by OBJECT_DECLARE_SIMPLE_TYPE,
which means it doesn't need the class!

Therefore, use OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES to implement
the type, then there's no need for class definition.

Cc: Halil Pasic <pa...@linux.ibm.com>
Cc: Christian Borntraeger <borntrae...@linux.ibm.com>
Cc: Thomas Huth <th...@redhat.com>
Cc: Richard Henderson <richard.hender...@linaro.org>
Cc: David Hildenbrand <da...@redhat.com>
Cc: Ilya Leoshkevich <i...@linux.ibm.com>
Cc: qemu-s3...@nongnu.org
Signed-off-by: Zhao Liu <zhao1....@intel.com>
---
 target/s390x/kvm/pv.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/target/s390x/kvm/pv.c b/target/s390x/kvm/pv.c
index 2bc916a5455f..a4dbbcef7e08 100644
--- a/target/s390x/kvm/pv.c
+++ b/target/s390x/kvm/pv.c
@@ -313,12 +313,6 @@ struct S390PVGuest {
     ConfidentialGuestSupport parent_obj;
 };
 
-typedef struct S390PVGuestClass S390PVGuestClass;
-
-struct S390PVGuestClass {
-    ConfidentialGuestSupportClass parent_class;
-};
-
 /*
  * If protected virtualization is enabled, the amount of data that the
  * Read SCP Info Service Call can use is limited to one page. The
@@ -380,12 +374,12 @@ static int s390_pv_kvm_init(ConfidentialGuestSupport 
*cgs, Error **errp)
     return 0;
 }
 
-OBJECT_DEFINE_TYPE_WITH_INTERFACES(S390PVGuest,
-                                   s390_pv_guest,
-                                   S390_PV_GUEST,
-                                   CONFIDENTIAL_GUEST_SUPPORT,
-                                   { TYPE_USER_CREATABLE },
-                                   { NULL })
+OBJECT_DEFINE_SIMPLE_TYPE_WITH_INTERFACES(S390PVGuest,
+                                          s390_pv_guest,
+                                          S390_PV_GUEST,
+                                          CONFIDENTIAL_GUEST_SUPPORT,
+                                          { TYPE_USER_CREATABLE },
+                                          { NULL })
 
 static void s390_pv_guest_class_init(ObjectClass *oc, const void *data)
 {
-- 
2.34.1


Reply via email to