aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-08-31 17:07:37 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-09 09:27:11 -0400
commitc821774a3b7ca991d684c3966171d8657f842aea (patch)
tree57b444ef9ee2ac18c63795d00644776ac4b8cc43 /include/sysemu
parentfa34a3c58ae7161463aded42e70bd59c212ed9f4 (diff)
Use OBJECT_DECLARE_TYPE where possible
Replace DECLARE_OBJ_CHECKERS with OBJECT_DECLARE_TYPE where the typedefs can be safely removed. Generated running: $ ./scripts/codeconverter/converter.py -i \ --pattern=DeclareObjCheckers $(git grep -l '' -- '*.[ch]') Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20200831210740.126168-16-ehabkost@redhat.com> Message-Id: <20200831210740.126168-17-ehabkost@redhat.com> Message-Id: <20200831210740.126168-18-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/cryptodev.h6
-rw-r--r--include/sysemu/hostmem.h6
-rw-r--r--include/sysemu/rng.h6
-rw-r--r--include/sysemu/tpm_backend.h6
-rw-r--r--include/sysemu/vhost-user-backend.h6
5 files changed, 10 insertions, 20 deletions
diff --git a/include/sysemu/cryptodev.h b/include/sysemu/cryptodev.h
index 65c017cf81..06726f7014 100644
--- a/include/sysemu/cryptodev.h
+++ b/include/sysemu/cryptodev.h
@@ -37,10 +37,8 @@
#define TYPE_CRYPTODEV_BACKEND "cryptodev-backend"
-typedef struct CryptoDevBackend CryptoDevBackend;
-typedef struct CryptoDevBackendClass CryptoDevBackendClass;
-DECLARE_OBJ_CHECKERS(CryptoDevBackend, CryptoDevBackendClass,
- CRYPTODEV_BACKEND, TYPE_CRYPTODEV_BACKEND)
+OBJECT_DECLARE_TYPE(CryptoDevBackend, CryptoDevBackendClass,
+ cryptodev_backend, CRYPTODEV_BACKEND)
#define MAX_CRYPTO_QUEUE_NUM 64
diff --git a/include/sysemu/hostmem.h b/include/sysemu/hostmem.h
index 1e6078f872..e5b7a152d3 100644
--- a/include/sysemu/hostmem.h
+++ b/include/sysemu/hostmem.h
@@ -20,10 +20,8 @@
#include "qemu/bitmap.h"
#define TYPE_MEMORY_BACKEND "memory-backend"
-typedef struct HostMemoryBackend HostMemoryBackend;
-typedef struct HostMemoryBackendClass HostMemoryBackendClass;
-DECLARE_OBJ_CHECKERS(HostMemoryBackend, HostMemoryBackendClass,
- MEMORY_BACKEND, TYPE_MEMORY_BACKEND)
+OBJECT_DECLARE_TYPE(HostMemoryBackend, HostMemoryBackendClass,
+ memory_backend, MEMORY_BACKEND)
/* hostmem-ram.c */
/**
diff --git a/include/sysemu/rng.h b/include/sysemu/rng.h
index f8fc948109..cee45a4787 100644
--- a/include/sysemu/rng.h
+++ b/include/sysemu/rng.h
@@ -17,10 +17,8 @@
#include "qom/object.h"
#define TYPE_RNG_BACKEND "rng-backend"
-typedef struct RngBackend RngBackend;
-typedef struct RngBackendClass RngBackendClass;
-DECLARE_OBJ_CHECKERS(RngBackend, RngBackendClass,
- RNG_BACKEND, TYPE_RNG_BACKEND)
+OBJECT_DECLARE_TYPE(RngBackend, RngBackendClass,
+ rng_backend, RNG_BACKEND)
#define TYPE_RNG_BUILTIN "rng-builtin"
diff --git a/include/sysemu/tpm_backend.h b/include/sysemu/tpm_backend.h
index e038b79d34..7e8a014031 100644
--- a/include/sysemu/tpm_backend.h
+++ b/include/sysemu/tpm_backend.h
@@ -19,10 +19,8 @@
#include "qapi/error.h"
#define TYPE_TPM_BACKEND "tpm-backend"
-typedef struct TPMBackend TPMBackend;
-typedef struct TPMBackendClass TPMBackendClass;
-DECLARE_OBJ_CHECKERS(TPMBackend, TPMBackendClass,
- TPM_BACKEND, TYPE_TPM_BACKEND)
+OBJECT_DECLARE_TYPE(TPMBackend, TPMBackendClass,
+ tpm_backend, TPM_BACKEND)
typedef struct TPMBackendCmd {
diff --git a/include/sysemu/vhost-user-backend.h b/include/sysemu/vhost-user-backend.h
index e4c85e33c0..76ca06cf40 100644
--- a/include/sysemu/vhost-user-backend.h
+++ b/include/sysemu/vhost-user-backend.h
@@ -22,10 +22,8 @@
#include "io/channel.h"
#define TYPE_VHOST_USER_BACKEND "vhost-user-backend"
-typedef struct VhostUserBackend VhostUserBackend;
-typedef struct VhostUserBackendClass VhostUserBackendClass;
-DECLARE_OBJ_CHECKERS(VhostUserBackend, VhostUserBackendClass,
- VHOST_USER_BACKEND, TYPE_VHOST_USER_BACKEND)
+OBJECT_DECLARE_TYPE(VhostUserBackend, VhostUserBackendClass,
+ vhost_user_backend, VHOST_USER_BACKEND)
struct VhostUserBackendClass {