diff options
author | Eduardo Habkost | 2020-09-16 20:25:17 +0200 |
---|---|---|
committer | Eduardo Habkost | 2020-09-18 20:12:32 +0200 |
commit | 30b5707c269cac1ad80b72f777e52c8e08b2ff19 (patch) | |
tree | 7201b93d5b438b3a608040e71b10ffec73f9c980 /include/sysemu | |
parent | qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE (diff) | |
download | qemu-30b5707c269cac1ad80b72f777e52c8e08b2ff19.tar.gz qemu-30b5707c269cac1ad80b72f777e52c8e08b2ff19.tar.xz qemu-30b5707c269cac1ad80b72f777e52c8e08b2ff19.zip |
qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros
One of the goals of having less boilerplate on QOM declarations
is to avoid human error. Requiring an extra argument that is
never used is an opportunity for mistakes.
Remove the unused argument from OBJECT_DECLARE_TYPE and
OBJECT_DECLARE_SIMPLE_TYPE.
Coccinelle patch used to convert all users of the macros:
@@
declarer name OBJECT_DECLARE_TYPE;
identifier InstanceType, ClassType, lowercase, UPPERCASE;
@@
OBJECT_DECLARE_TYPE(InstanceType, ClassType,
- lowercase,
UPPERCASE);
@@
declarer name OBJECT_DECLARE_SIMPLE_TYPE;
identifier InstanceType, lowercase, UPPERCASE;
@@
OBJECT_DECLARE_SIMPLE_TYPE(InstanceType,
- lowercase,
UPPERCASE);
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Acked-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Paul Durrant <paul@xen.org>
Acked-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200916182519.415636-4-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/sysemu')
-rw-r--r-- | include/sysemu/cryptodev.h | 2 | ||||
-rw-r--r-- | include/sysemu/hostmem.h | 2 | ||||
-rw-r--r-- | include/sysemu/rng.h | 2 | ||||
-rw-r--r-- | include/sysemu/tpm_backend.h | 2 | ||||
-rw-r--r-- | include/sysemu/vhost-user-backend.h | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/include/sysemu/cryptodev.h b/include/sysemu/cryptodev.h index 06726f7014..b458aa4dae 100644 --- a/include/sysemu/cryptodev.h +++ b/include/sysemu/cryptodev.h @@ -38,7 +38,7 @@ #define TYPE_CRYPTODEV_BACKEND "cryptodev-backend" OBJECT_DECLARE_TYPE(CryptoDevBackend, CryptoDevBackendClass, - cryptodev_backend, CRYPTODEV_BACKEND) + CRYPTODEV_BACKEND) #define MAX_CRYPTO_QUEUE_NUM 64 diff --git a/include/sysemu/hostmem.h b/include/sysemu/hostmem.h index e5b7a152d3..df5644723a 100644 --- a/include/sysemu/hostmem.h +++ b/include/sysemu/hostmem.h @@ -21,7 +21,7 @@ #define TYPE_MEMORY_BACKEND "memory-backend" OBJECT_DECLARE_TYPE(HostMemoryBackend, HostMemoryBackendClass, - memory_backend, MEMORY_BACKEND) + MEMORY_BACKEND) /* hostmem-ram.c */ /** diff --git a/include/sysemu/rng.h b/include/sysemu/rng.h index cee45a4787..e383f87d20 100644 --- a/include/sysemu/rng.h +++ b/include/sysemu/rng.h @@ -18,7 +18,7 @@ #define TYPE_RNG_BACKEND "rng-backend" OBJECT_DECLARE_TYPE(RngBackend, RngBackendClass, - rng_backend, 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 7e8a014031..6f078f5f48 100644 --- a/include/sysemu/tpm_backend.h +++ b/include/sysemu/tpm_backend.h @@ -20,7 +20,7 @@ #define TYPE_TPM_BACKEND "tpm-backend" OBJECT_DECLARE_TYPE(TPMBackend, TPMBackendClass, - tpm_backend, TPM_BACKEND) + TPM_BACKEND) typedef struct TPMBackendCmd { diff --git a/include/sysemu/vhost-user-backend.h b/include/sysemu/vhost-user-backend.h index 41d5ff43bd..327b0b84f1 100644 --- a/include/sysemu/vhost-user-backend.h +++ b/include/sysemu/vhost-user-backend.h @@ -22,7 +22,7 @@ #include "io/channel.h" #define TYPE_VHOST_USER_BACKEND "vhost-user-backend" -OBJECT_DECLARE_SIMPLE_TYPE(VhostUserBackend, vhost_user_backend, +OBJECT_DECLARE_SIMPLE_TYPE(VhostUserBackend, VHOST_USER_BACKEND) |