From 8063396bf3459a810d24e3efd6110b8480f0de5b Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Wed, 16 Sep 2020 14:25:19 -0400 Subject: 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 Acked-by: Paul Durrant Message-Id: <20200916182519.415636-6-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost --- include/hw/nubus/mac-nubus-bridge.h | 4 +--- include/hw/nubus/nubus.h | 8 ++------ 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'include/hw/nubus') diff --git a/include/hw/nubus/mac-nubus-bridge.h b/include/hw/nubus/mac-nubus-bridge.h index 6856d7e095..36aa098dd4 100644 --- a/include/hw/nubus/mac-nubus-bridge.h +++ b/include/hw/nubus/mac-nubus-bridge.h @@ -13,9 +13,7 @@ #include "qom/object.h" #define TYPE_MAC_NUBUS_BRIDGE "mac-nubus-bridge" -typedef struct MacNubusState MacNubusState; -DECLARE_INSTANCE_CHECKER(MacNubusState, MAC_NUBUS_BRIDGE, - TYPE_MAC_NUBUS_BRIDGE) +OBJECT_DECLARE_SIMPLE_TYPE(MacNubusState, MAC_NUBUS_BRIDGE) struct MacNubusState { SysBusDevice sysbus_dev; diff --git a/include/hw/nubus/nubus.h b/include/hw/nubus/nubus.h index 9370f0d8f0..e2b5cf260b 100644 --- a/include/hw/nubus/nubus.h +++ b/include/hw/nubus/nubus.h @@ -23,14 +23,10 @@ #define NUBUS_LAST_SLOT 0xF #define TYPE_NUBUS_DEVICE "nubus-device" -typedef struct NubusDevice NubusDevice; -DECLARE_INSTANCE_CHECKER(NubusDevice, NUBUS_DEVICE, - TYPE_NUBUS_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(NubusDevice, NUBUS_DEVICE) #define TYPE_NUBUS_BUS "nubus-bus" -typedef struct NubusBus NubusBus; -DECLARE_INSTANCE_CHECKER(NubusBus, NUBUS_BUS, - TYPE_NUBUS_BUS) +OBJECT_DECLARE_SIMPLE_TYPE(NubusBus, NUBUS_BUS) #define TYPE_NUBUS_BRIDGE "nubus-bridge" -- cgit v1.2.3-55-g7522