From 8110fa1d94f2997badc2af39231a1d279c5bb1ee Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Mon, 31 Aug 2020 17:07:33 -0400 Subject: Use DECLARE_*CHECKER* macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=TypeCheckMacro $(git grep -l '' -- '*.[ch]') Reviewed-by: Daniel P. Berrangé Reviewed-by: Juan Quintela Message-Id: <20200831210740.126168-12-ehabkost@redhat.com> Reviewed-by: Juan Quintela Message-Id: <20200831210740.126168-13-ehabkost@redhat.com> Message-Id: <20200831210740.126168-14-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- migration/migration.h | 8 ++------ migration/rdma.c | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'migration') diff --git a/migration/migration.h b/migration/migration.h index 4103e54..bdc7450 100644 --- a/migration/migration.h +++ b/migration/migration.h @@ -116,12 +116,8 @@ void fill_destination_postcopy_migration_info(MigrationInfo *info); #define TYPE_MIGRATION "migration" typedef struct MigrationClass MigrationClass; -#define MIGRATION_OBJ_CLASS(klass) \ - OBJECT_CLASS_CHECK(MigrationClass, (klass), TYPE_MIGRATION) -#define MIGRATION_OBJ(obj) \ - OBJECT_CHECK(MigrationState, (obj), TYPE_MIGRATION) -#define MIGRATION_OBJ_GET_CLASS(obj) \ - OBJECT_GET_CLASS(MigrationClass, (obj), TYPE_MIGRATION) +DECLARE_OBJ_CHECKERS(MigrationState, MigrationClass, + MIGRATION_OBJ, TYPE_MIGRATION) struct MigrationClass { /*< private >*/ diff --git a/migration/rdma.c b/migration/rdma.c index 0a90f0d..1dc563e 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -399,8 +399,8 @@ typedef struct RDMAContext { #define TYPE_QIO_CHANNEL_RDMA "qio-channel-rdma" typedef struct QIOChannelRDMA QIOChannelRDMA; -#define QIO_CHANNEL_RDMA(obj) \ - OBJECT_CHECK(QIOChannelRDMA, (obj), TYPE_QIO_CHANNEL_RDMA) +DECLARE_INSTANCE_CHECKER(QIOChannelRDMA, QIO_CHANNEL_RDMA, + TYPE_QIO_CHANNEL_RDMA) -- cgit v1.1