From c734cd40a10943753a4d015c9d0a6c08c8f0159e Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 16 Sep 2020 14:25:16 -0400 Subject: qom: Remove ParentClassType argument from OBJECT_DECLARE_SIMPLE_TYPE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The requirement to specify the parent class type makes the macro harder to use and easy to misuse (silent bugs can be introduced if the wrong struct type is specified). Simplify the macro by just not declaring any class struct, allowing us to remove the class_size field from the TypeInfo variables for those types. Signed-off-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200916182519.415636-3-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- crypto/secret_keyring.c | 1 - 1 file changed, 1 deletion(-) (limited to 'crypto') diff --git a/crypto/secret_keyring.c b/crypto/secret_keyring.c index 8bfc58ebf4..10d8bc48a0 100644 --- a/crypto/secret_keyring.c +++ b/crypto/secret_keyring.c @@ -129,7 +129,6 @@ static const TypeInfo qcrypto_secret_info = { .parent = TYPE_QCRYPTO_SECRET_COMMON, .name = TYPE_QCRYPTO_SECRET_KEYRING, .instance_size = sizeof(QCryptoSecretKeyring), - .class_size = sizeof(QCryptoSecretKeyringClass), .class_init = qcrypto_secret_keyring_class_init, .interfaces = (InterfaceInfo[]) { { TYPE_USER_CREATABLE }, -- cgit v1.2.3