diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-16 14:25:19 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-18 14:12:32 -0400 |
commit | 8063396bf3459a810d24e3efd6110b8480f0de5b (patch) | |
tree | 40f85f15d7016e3ee66916a59be53d2b2c71510a /hw/hyperv | |
parent | a489d1951cd9cc91c5954214fcf6ae0f9d2d4292 (diff) | |
download | qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.zip qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.tar.gz qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.tar.bz2 |
Use OBJECT_DECLARE_SIMPLE_TYPE when possible
This converts existing DECLARE_INSTANCE_CHECKER usage to
OBJECT_DECLARE_SIMPLE_TYPE when possible.
$ ./scripts/codeconverter/converter.py -i \
--pattern=AddObjectDeclareSimpleType $(git grep -l '' -- '*.[ch]')
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Acked-by: Paul Durrant <paul@xen.org>
Message-Id: <20200916182519.415636-6-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/hyperv')
-rw-r--r-- | hw/hyperv/hyperv.c | 4 | ||||
-rw-r--r-- | hw/hyperv/hyperv_testdev.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index aa5a2a9..4b26db1 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv/hyperv.c @@ -35,11 +35,9 @@ struct SynICState { struct hyperv_message_page *msg_page; struct hyperv_event_flags_page *event_page; }; -typedef struct SynICState SynICState; #define TYPE_SYNIC "hyperv-synic" -DECLARE_INSTANCE_CHECKER(SynICState, SYNIC, - TYPE_SYNIC) +OBJECT_DECLARE_SIMPLE_TYPE(SynICState, SYNIC) static bool synic_enabled; diff --git a/hw/hyperv/hyperv_testdev.c b/hw/hyperv/hyperv_testdev.c index f6ee98e..9a56ddf 100644 --- a/hw/hyperv/hyperv_testdev.c +++ b/hw/hyperv/hyperv_testdev.c @@ -47,11 +47,9 @@ struct HypervTestDev { QLIST_HEAD(, TestMsgConn) msg_conns; QLIST_HEAD(, TestEvtConn) evt_conns; }; -typedef struct HypervTestDev HypervTestDev; #define TYPE_HYPERV_TEST_DEV "hyperv-testdev" -DECLARE_INSTANCE_CHECKER(HypervTestDev, HYPERV_TEST_DEV, - TYPE_HYPERV_TEST_DEV) +OBJECT_DECLARE_SIMPLE_TYPE(HypervTestDev, HYPERV_TEST_DEV) enum { HV_TEST_DEV_SINT_ROUTE_CREATE = 1, |