]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
qom: make interface types abstract
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 4 Dec 2018 14:20:06 +0000 (18:20 +0400)
committerEduardo Habkost <ehabkost@redhat.com>
Tue, 11 Dec 2018 17:45:22 +0000 (15:45 -0200)
Interfaces don't have instance, let's make the interface type really
abstract to avoid confusion.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20181204142023.15982-3-marcandre.lureau@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
15 files changed:
include/hw/acpi/acpi_dev_interface.h
include/hw/arm/linux-boot-if.h
include/hw/fw-path-provider.h
include/hw/hotplug.h
include/hw/intc/intc.h
include/hw/ipmi/ipmi.h
include/hw/isa/isa.h
include/hw/mem/memory-device.h
include/hw/nmi.h
include/hw/stream.h
include/hw/timer/m48t59.h
include/qom/object_interfaces.h
include/sysemu/tpm.h
target/arm/idau.h
tests/check-qom-interface.c

index dabf4c4fc95adab77d9f221f7a2aed7443c1451a..43ff119179f1f20a4c58d4efa22f979d1c575daf 100644 (file)
@@ -25,11 +25,7 @@ typedef enum {
      INTERFACE_CHECK(AcpiDeviceIf, (obj), \
                      TYPE_ACPI_DEVICE_IF)
 
-
-typedef struct AcpiDeviceIf {
-    /* <private> */
-    Object Parent;
-} AcpiDeviceIf;
+typedef struct AcpiDeviceIf AcpiDeviceIf;
 
 void acpi_send_event(DeviceState *dev, AcpiEventStatusBits event);
 
index aba4479a14d742ff7020a5c402437f5b3b36123a..7bbdfd1cc688328055883811b483a7c5e4179253 100644 (file)
 #define ARM_LINUX_BOOT_IF(obj) \
     INTERFACE_CHECK(ARMLinuxBootIf, (obj), TYPE_ARM_LINUX_BOOT_IF)
 
-typedef struct ARMLinuxBootIf {
-    /*< private >*/
-    Object parent_obj;
-} ARMLinuxBootIf;
+typedef struct ARMLinuxBootIf ARMLinuxBootIf;
 
 typedef struct ARMLinuxBootIfClass {
     /*< private >*/
index 050cb05d92796a4e9753dbb1a7a5511ee67e8b69..5df893a3d8f76c14676b6cc276b2b01f05ce944d 100644 (file)
@@ -30,9 +30,7 @@
 #define FW_PATH_PROVIDER(obj) \
      INTERFACE_CHECK(FWPathProvider, (obj), TYPE_FW_PATH_PROVIDER)
 
-typedef struct FWPathProvider {
-    Object parent_obj;
-} FWPathProvider;
+typedef struct FWPathProvider FWPathProvider;
 
 typedef struct FWPathProviderClass {
     InterfaceClass parent_class;
index 1a0516a479532cef42b4acb81f3adb7ac175d1ac..6321e292fddc0b0e611da6f3767d9b680fc674a3 100644 (file)
 #define HOTPLUG_HANDLER(obj) \
      INTERFACE_CHECK(HotplugHandler, (obj), TYPE_HOTPLUG_HANDLER)
 
-
-typedef struct HotplugHandler {
-    /* <private> */
-    Object Parent;
-} HotplugHandler;
+typedef struct HotplugHandler HotplugHandler;
 
 /**
  * hotplug_fn:
index 27d9828943ae0b667eb198d3c60dc9bf31daf552..fb3e8e621f0b88b6e1447f3187589a26eef94b3a 100644 (file)
@@ -15,9 +15,7 @@
     INTERFACE_CHECK(InterruptStatsProvider, (obj), \
                     TYPE_INTERRUPT_STATS_PROVIDER)
 
-typedef struct InterruptStatsProvider {
-    Object parent;
-} InterruptStatsProvider;
+typedef struct InterruptStatsProvider InterruptStatsProvider;
 
 typedef struct InterruptStatsProviderClass {
     InterfaceClass parent;
index 0affe5a4d864bc4a495acd56611594940da53227..99661d2bf0f742044dcb9bfb4ee6b853c4725d04 100644 (file)
@@ -114,9 +114,7 @@ uint32_t ipmi_next_uuid(void);
 #define IPMI_INTERFACE_GET_CLASS(class) \
      OBJECT_GET_CLASS(IPMIInterfaceClass, (class), TYPE_IPMI_INTERFACE)
 
-typedef struct IPMIInterface {
-    Object parent;
-} IPMIInterface;
+typedef struct IPMIInterface IPMIInterface;
 
 typedef struct IPMIInterfaceClass {
     InterfaceClass parent;
index b9dbab24b44f3be2e785f66b549add89a1062c5f..e62ac91c198700e960ccdaaf5c6f55025a47c0ac 100644 (file)
@@ -43,10 +43,6 @@ static inline uint16_t applesmc_port(void)
 #define ISADMA(obj) \
     INTERFACE_CHECK(IsaDma, (obj), TYPE_ISADMA)
 
-struct IsaDma {
-    Object parent;
-};
-
 typedef enum {
     ISADMA_TRANSFER_VERIFY,
     ISADMA_TRANSFER_READ,
index e904e194d5e226a3a44b85cb63ef495ec537bcea..0293a96abb237ac84d25cf914bebf3282553a144 100644 (file)
@@ -25,9 +25,7 @@
 #define MEMORY_DEVICE(obj) \
      INTERFACE_CHECK(MemoryDeviceState, (obj), TYPE_MEMORY_DEVICE)
 
-typedef struct MemoryDeviceState {
-    Object parent_obj;
-} MemoryDeviceState;
+typedef struct MemoryDeviceState MemoryDeviceState;
 
 /**
  * MemoryDeviceClass:
index d092c684a160fdc941ebeebb5217e61956ac4491..ad857f3832ee18f93f30acb23d11a934aa29d22f 100644 (file)
@@ -34,9 +34,7 @@
 #define NMI(obj) \
      INTERFACE_CHECK(NMI, (obj), TYPE_NMI)
 
-typedef struct NMIState {
-    Object parent_obj;
-} NMIState;
+typedef struct NMIState NMIState;
 
 typedef struct NMIClass {
     InterfaceClass parent_class;
index c370ba0c6642b5d457db52b04612d58948f7ffeb..15774f07abc6b0f01bf7c619d47f28bb24845fe7 100644 (file)
@@ -14,9 +14,7 @@
 #define STREAM_SLAVE(obj) \
      INTERFACE_CHECK(StreamSlave, (obj), TYPE_STREAM_SLAVE)
 
-typedef struct StreamSlave {
-    Object Parent;
-} StreamSlave;
+typedef struct StreamSlave StreamSlave;
 
 typedef void (*StreamCanPushNotifyFn)(void *opaque);
 
index db5e43a8daac88b0c6671556343f72fe359093f3..6f8db04fce6a96770eca21048a957aae999b067a 100644 (file)
@@ -13,9 +13,7 @@
 #define NVRAM(obj) \
     INTERFACE_CHECK(Nvram, (obj), TYPE_NVRAM)
 
-typedef struct Nvram {
-    Object parent;
-} Nvram;
+typedef struct Nvram Nvram;
 
 typedef struct NvramClass {
     InterfaceClass parent;
index 4d513fb329f134c264e2ab72645aef32e4c7b8c5..652a16d2bab57d4ffc53ffca86ab22d3589ed5d5 100644 (file)
      INTERFACE_CHECK(UserCreatable, (obj), \
                      TYPE_USER_CREATABLE)
 
-
-typedef struct UserCreatable {
-    /* <private> */
-    Object Parent;
-} UserCreatable;
+typedef struct UserCreatable UserCreatable;
 
 /**
  * UserCreatableClass:
index 17a97ed77ad243509d07192b5730577dc13ae2d7..5b541a71c872b6164cb8605d20626d97d5118925 100644 (file)
@@ -33,9 +33,7 @@ typedef enum TPMVersion {
 #define TPM_IF(obj)                             \
     INTERFACE_CHECK(TPMIf, (obj), TYPE_TPM_IF)
 
-typedef struct TPMIf {
-    Object parent_obj;
-} TPMIf;
+typedef struct TPMIf TPMIf;
 
 typedef struct TPMIfClass {
     InterfaceClass parent_class;
index cac27b95fa9448b57ac0014711831b3497793e6b..7c0e4e377619b3b8b14e26a654f89f0c9eaed06a 100644 (file)
@@ -38,9 +38,7 @@
 #define IDAU_INTERFACE_GET_CLASS(obj) \
     OBJECT_GET_CLASS(IDAUInterfaceClass, (obj), TYPE_IDAU_INTERFACE)
 
-typedef struct IDAUInterface {
-    Object parent;
-} IDAUInterface;
+typedef struct IDAUInterface IDAUInterface;
 
 #define IREGION_NOTVALID -1
 
index f87c9aaa8ad473730f03c84b7a483737e57642f3..2177f0dce5d2f45ac2e4615a22e28de6b918e7fe 100644 (file)
@@ -23,9 +23,7 @@
 #define TEST_IF(obj) \
      INTERFACE_CHECK(TestIf, (obj), TYPE_TEST_IF)
 
-typedef struct TestIf {
-    Object parent_obj;
-} TestIf;
+typedef struct TestIf TestIf;
 
 typedef struct TestIfClass {
     InterfaceClass parent_class;