diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2020-08-31 17:07:33 -0400 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-09-09 09:27:09 -0400 |
commit | 8110fa1d94f2997badc2af39231a1d279c5bb1ee (patch) | |
tree | 6bff28c7907dfb0cbb367ca113f4d02ea03f3a51 /include/net | |
parent | db1015e92e04835c9eb50c29625fe566d1202dbd (diff) | |
download | qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.zip |
Use DECLARE_*CHECKER* macros
Generated using:
$ ./scripts/codeconverter/converter.py -i \
--pattern=TypeCheckMacro $(git grep -l '' -- '*.[ch]')
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20200831210740.126168-12-ehabkost@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20200831210740.126168-13-ehabkost@redhat.com>
Message-Id: <20200831210740.126168-14-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/can_emu.h | 4 | ||||
-rw-r--r-- | include/net/can_host.h | 8 | ||||
-rw-r--r-- | include/net/filter.h | 8 |
3 files changed, 6 insertions, 14 deletions
diff --git a/include/net/can_emu.h b/include/net/can_emu.h index 7e90fd8a45..150f91a657 100644 --- a/include/net/can_emu.h +++ b/include/net/can_emu.h @@ -100,8 +100,8 @@ struct CanBusClientState { }; #define TYPE_CAN_BUS "can-bus" -#define CAN_BUS(obj) \ - OBJECT_CHECK(CanBusState, (obj), TYPE_CAN_BUS) +DECLARE_INSTANCE_CHECKER(CanBusState, CAN_BUS, + TYPE_CAN_BUS) int can_bus_filter_match(struct qemu_can_filter *filter, qemu_canid_t can_id); diff --git a/include/net/can_host.h b/include/net/can_host.h index 13b6a191dd..18979c2e2d 100644 --- a/include/net/can_host.h +++ b/include/net/can_host.h @@ -34,12 +34,8 @@ #define TYPE_CAN_HOST "can-host" typedef struct CanHostClass CanHostClass; typedef struct CanHostState CanHostState; -#define CAN_HOST_CLASS(klass) \ - OBJECT_CLASS_CHECK(CanHostClass, (klass), TYPE_CAN_HOST) -#define CAN_HOST_GET_CLASS(obj) \ - OBJECT_GET_CLASS(CanHostClass, (obj), TYPE_CAN_HOST) -#define CAN_HOST(obj) \ - OBJECT_CHECK(CanHostState, (obj), TYPE_CAN_HOST) +DECLARE_OBJ_CHECKERS(CanHostState, CanHostClass, + CAN_HOST, TYPE_CAN_HOST) struct CanHostState { ObjectClass oc; diff --git a/include/net/filter.h b/include/net/filter.h index 0d4f011bc0..e7e593128a 100644 --- a/include/net/filter.h +++ b/include/net/filter.h @@ -16,12 +16,8 @@ #define TYPE_NETFILTER "netfilter" typedef struct NetFilterClass NetFilterClass; -#define NETFILTER(obj) \ - OBJECT_CHECK(NetFilterState, (obj), TYPE_NETFILTER) -#define NETFILTER_GET_CLASS(obj) \ - OBJECT_GET_CLASS(NetFilterClass, (obj), TYPE_NETFILTER) -#define NETFILTER_CLASS(klass) \ - OBJECT_CLASS_CHECK(NetFilterClass, (klass), TYPE_NETFILTER) +DECLARE_OBJ_CHECKERS(NetFilterState, NetFilterClass, + NETFILTER, TYPE_NETFILTER) typedef void (FilterSetup) (NetFilterState *nf, Error **errp); typedef void (FilterCleanup) (NetFilterState *nf); |