From 30b5707c269cac1ad80b72f777e52c8e08b2ff19 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 16 Sep 2020 14:25:17 -0400 Subject: 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 Reviewed-by: Cédric Le Goater Acked-by: Cornelia Huck Acked-by: Igor Mammedov Acked-by: Paul Durrant Acked-by: Thomas Huth Message-Id: <20200916182519.415636-4-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- include/crypto/secret_common.h | 2 +- include/crypto/secret_keyring.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'include/crypto') diff --git a/include/crypto/secret_common.h b/include/crypto/secret_common.h index daf00c3b2a..42c7ff7af6 100644 --- a/include/crypto/secret_common.h +++ b/include/crypto/secret_common.h @@ -26,7 +26,7 @@ #define TYPE_QCRYPTO_SECRET_COMMON "secret_common" OBJECT_DECLARE_TYPE(QCryptoSecretCommon, QCryptoSecretCommonClass, - qcrypto_secret_common, QCRYPTO_SECRET_COMMON) + QCRYPTO_SECRET_COMMON) struct QCryptoSecretCommon { diff --git a/include/crypto/secret_keyring.h b/include/crypto/secret_keyring.h index 803f3fc28b..3758852cb8 100644 --- a/include/crypto/secret_keyring.h +++ b/include/crypto/secret_keyring.h @@ -26,7 +26,7 @@ #include "crypto/secret_common.h" #define TYPE_QCRYPTO_SECRET_KEYRING "secret_keyring" -OBJECT_DECLARE_SIMPLE_TYPE(QCryptoSecretKeyring, qcrypto_secret_keyring, +OBJECT_DECLARE_SIMPLE_TYPE(QCryptoSecretKeyring, QCRYPTO_SECRET_KEYRING) -- cgit v1.2.3-55-g7522