aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2020-09-16 14:25:19 -0400
committerEduardo Habkost <ehabkost@redhat.com>2020-09-18 14:12:32 -0400
commit8063396bf3459a810d24e3efd6110b8480f0de5b (patch)
tree40f85f15d7016e3ee66916a59be53d2b2c71510a /net
parenta489d1951cd9cc91c5954214fcf6ae0f9d2d4292 (diff)
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 'net')
-rw-r--r--net/can/can_socketcan.c4
-rw-r--r--net/dump.c4
-rw-r--r--net/filter-buffer.c4
-rw-r--r--net/filter-replay.c4
-rw-r--r--net/filter-rewriter.c4
5 files changed, 5 insertions, 15 deletions
diff --git a/net/can/can_socketcan.c b/net/can/can_socketcan.c
index f933bd2db2..ce8c2549ed 100644
--- a/net/can/can_socketcan.c
+++ b/net/can/can_socketcan.c
@@ -47,9 +47,7 @@
#endif /*DEBUG_CAN*/
#define TYPE_CAN_HOST_SOCKETCAN "can-host-socketcan"
-typedef struct CanHostSocketCAN CanHostSocketCAN;
-DECLARE_INSTANCE_CHECKER(CanHostSocketCAN, CAN_HOST_SOCKETCAN,
- TYPE_CAN_HOST_SOCKETCAN)
+OBJECT_DECLARE_SIMPLE_TYPE(CanHostSocketCAN, CAN_HOST_SOCKETCAN)
#define CAN_READ_BUF_LEN 5
struct CanHostSocketCAN {
diff --git a/net/dump.c b/net/dump.c
index 42e64a6f29..7fd448d2e1 100644
--- a/net/dump.c
+++ b/net/dump.c
@@ -140,9 +140,7 @@ static int net_dump_state_init(DumpState *s, const char *filename,
#define TYPE_FILTER_DUMP "filter-dump"
-typedef struct NetFilterDumpState NetFilterDumpState;
-DECLARE_INSTANCE_CHECKER(NetFilterDumpState, FILTER_DUMP,
- TYPE_FILTER_DUMP)
+OBJECT_DECLARE_SIMPLE_TYPE(NetFilterDumpState, FILTER_DUMP)
struct NetFilterDumpState {
NetFilterState nfs;
diff --git a/net/filter-buffer.c b/net/filter-buffer.c
index 6ade7a19b8..d8392be53c 100644
--- a/net/filter-buffer.c
+++ b/net/filter-buffer.c
@@ -18,9 +18,7 @@
#define TYPE_FILTER_BUFFER "filter-buffer"
-typedef struct FilterBufferState FilterBufferState;
-DECLARE_INSTANCE_CHECKER(FilterBufferState, FILTER_BUFFER,
- TYPE_FILTER_BUFFER)
+OBJECT_DECLARE_SIMPLE_TYPE(FilterBufferState, FILTER_BUFFER)
struct FilterBufferState {
NetFilterState parent_obj;
diff --git a/net/filter-replay.c b/net/filter-replay.c
index 78696c162e..eef8443059 100644
--- a/net/filter-replay.c
+++ b/net/filter-replay.c
@@ -23,9 +23,7 @@
#define TYPE_FILTER_REPLAY "filter-replay"
-typedef struct NetFilterReplayState NetFilterReplayState;
-DECLARE_INSTANCE_CHECKER(NetFilterReplayState, FILTER_REPLAY,
- TYPE_FILTER_REPLAY)
+OBJECT_DECLARE_SIMPLE_TYPE(NetFilterReplayState, FILTER_REPLAY)
struct NetFilterReplayState {
NetFilterState nfs;
diff --git a/net/filter-rewriter.c b/net/filter-rewriter.c
index 3070b6d59e..dc3c27a489 100644
--- a/net/filter-rewriter.c
+++ b/net/filter-rewriter.c
@@ -24,9 +24,7 @@
#include "util.h"
#define TYPE_FILTER_REWRITER "filter-rewriter"
-typedef struct RewriterState RewriterState;
-DECLARE_INSTANCE_CHECKER(RewriterState, FILTER_REWRITER,
- TYPE_FILTER_REWRITER)
+OBJECT_DECLARE_SIMPLE_TYPE(RewriterState, FILTER_REWRITER)
#define FAILOVER_MODE_ON true
#define FAILOVER_MODE_OFF false