summaryrefslogtreecommitdiffstats
path: root/include/hw/net
diff options
context:
space:
mode:
authorEduardo Habkost2020-08-31 23:07:33 +0200
committerEduardo Habkost2020-09-09 15:27:09 +0200
commit8110fa1d94f2997badc2af39231a1d279c5bb1ee (patch)
tree6bff28c7907dfb0cbb367ca113f4d02ea03f3a51 /include/hw/net
parentMove QOM typedefs and add missing includes (diff)
downloadqemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.gz
qemu-8110fa1d94f2997badc2af39231a1d279c5bb1ee.tar.xz
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/hw/net')
-rw-r--r--include/hw/net/allwinner-sun8i-emac.h4
-rw-r--r--include/hw/net/allwinner_emac.h3
-rw-r--r--include/hw/net/cadence_gem.h3
-rw-r--r--include/hw/net/ftgmac100.h6
-rw-r--r--include/hw/net/imx_fec.h3
-rw-r--r--include/hw/net/lance.h4
-rw-r--r--include/hw/net/lasi_82596.h4
-rw-r--r--include/hw/net/msf2-emac.h4
8 files changed, 18 insertions, 13 deletions
diff --git a/include/hw/net/allwinner-sun8i-emac.h b/include/hw/net/allwinner-sun8i-emac.h
index bd38588885..89e56b815b 100644
--- a/include/hw/net/allwinner-sun8i-emac.h
+++ b/include/hw/net/allwinner-sun8i-emac.h
@@ -31,8 +31,8 @@
#define TYPE_AW_SUN8I_EMAC "allwinner-sun8i-emac"
typedef struct AwSun8iEmacState AwSun8iEmacState;
-#define AW_SUN8I_EMAC(obj) \
- OBJECT_CHECK(AwSun8iEmacState, (obj), TYPE_AW_SUN8I_EMAC)
+DECLARE_INSTANCE_CHECKER(AwSun8iEmacState, AW_SUN8I_EMAC,
+ TYPE_AW_SUN8I_EMAC)
/** @} */
diff --git a/include/hw/net/allwinner_emac.h b/include/hw/net/allwinner_emac.h
index e927082580..f5f5b67939 100644
--- a/include/hw/net/allwinner_emac.h
+++ b/include/hw/net/allwinner_emac.h
@@ -32,7 +32,8 @@
#define TYPE_AW_EMAC "allwinner-emac"
typedef struct AwEmacState AwEmacState;
-#define AW_EMAC(obj) OBJECT_CHECK(AwEmacState, (obj), TYPE_AW_EMAC)
+DECLARE_INSTANCE_CHECKER(AwEmacState, AW_EMAC,
+ TYPE_AW_EMAC)
/*
* Allwinner EMAC register list
diff --git a/include/hw/net/cadence_gem.h b/include/hw/net/cadence_gem.h
index 04fd59a525..dff1083738 100644
--- a/include/hw/net/cadence_gem.h
+++ b/include/hw/net/cadence_gem.h
@@ -28,7 +28,8 @@
#define TYPE_CADENCE_GEM "cadence_gem"
typedef struct CadenceGEMState CadenceGEMState;
-#define CADENCE_GEM(obj) OBJECT_CHECK(CadenceGEMState, (obj), TYPE_CADENCE_GEM)
+DECLARE_INSTANCE_CHECKER(CadenceGEMState, CADENCE_GEM,
+ TYPE_CADENCE_GEM)
#include "net/net.h"
#include "hw/sysbus.h"
diff --git a/include/hw/net/ftgmac100.h b/include/hw/net/ftgmac100.h
index 6371bf60ab..c6b1c11fca 100644
--- a/include/hw/net/ftgmac100.h
+++ b/include/hw/net/ftgmac100.h
@@ -13,7 +13,8 @@
#define TYPE_FTGMAC100 "ftgmac100"
typedef struct FTGMAC100State FTGMAC100State;
-#define FTGMAC100(obj) OBJECT_CHECK(FTGMAC100State, (obj), TYPE_FTGMAC100)
+DECLARE_INSTANCE_CHECKER(FTGMAC100State, FTGMAC100,
+ TYPE_FTGMAC100)
#include "hw/sysbus.h"
#include "net/net.h"
@@ -70,7 +71,8 @@ struct FTGMAC100State {
#define TYPE_ASPEED_MII "aspeed-mmi"
typedef struct AspeedMiiState AspeedMiiState;
-#define ASPEED_MII(obj) OBJECT_CHECK(AspeedMiiState, (obj), TYPE_ASPEED_MII)
+DECLARE_INSTANCE_CHECKER(AspeedMiiState, ASPEED_MII,
+ TYPE_ASPEED_MII)
/*
* AST2600 MII controller
diff --git a/include/hw/net/imx_fec.h b/include/hw/net/imx_fec.h
index 4d6ac5e408..ffdbc304b6 100644
--- a/include/hw/net/imx_fec.h
+++ b/include/hw/net/imx_fec.h
@@ -27,7 +27,8 @@
#define TYPE_IMX_FEC "imx.fec"
typedef struct IMXFECState IMXFECState;
-#define IMX_FEC(obj) OBJECT_CHECK(IMXFECState, (obj), TYPE_IMX_FEC)
+DECLARE_INSTANCE_CHECKER(IMXFECState, IMX_FEC,
+ TYPE_IMX_FEC)
#define TYPE_IMX_ENET "imx.enet"
diff --git a/include/hw/net/lance.h b/include/hw/net/lance.h
index fe459ffea7..f645d6af67 100644
--- a/include/hw/net/lance.h
+++ b/include/hw/net/lance.h
@@ -36,8 +36,8 @@
#define TYPE_LANCE "lance"
typedef struct SysBusPCNetState SysBusPCNetState;
-#define SYSBUS_PCNET(obj) \
- OBJECT_CHECK(SysBusPCNetState, (obj), TYPE_LANCE)
+DECLARE_INSTANCE_CHECKER(SysBusPCNetState, SYSBUS_PCNET,
+ TYPE_LANCE)
struct SysBusPCNetState {
SysBusDevice parent_obj;
diff --git a/include/hw/net/lasi_82596.h b/include/hw/net/lasi_82596.h
index 141e0cc17a..7b62b04833 100644
--- a/include/hw/net/lasi_82596.h
+++ b/include/hw/net/lasi_82596.h
@@ -14,8 +14,8 @@
#define TYPE_LASI_82596 "lasi_82596"
typedef struct SysBusI82596State SysBusI82596State;
-#define SYSBUS_I82596(obj) \
- OBJECT_CHECK(SysBusI82596State, (obj), TYPE_LASI_82596)
+DECLARE_INSTANCE_CHECKER(SysBusI82596State, SYSBUS_I82596,
+ TYPE_LASI_82596)
struct SysBusI82596State {
SysBusDevice parent_obj;
diff --git a/include/hw/net/msf2-emac.h b/include/hw/net/msf2-emac.h
index 6aef711007..68194d798c 100644
--- a/include/hw/net/msf2-emac.h
+++ b/include/hw/net/msf2-emac.h
@@ -30,8 +30,8 @@
#define TYPE_MSS_EMAC "msf2-emac"
typedef struct MSF2EmacState MSF2EmacState;
-#define MSS_EMAC(obj) \
- OBJECT_CHECK(MSF2EmacState, (obj), TYPE_MSS_EMAC)
+DECLARE_INSTANCE_CHECKER(MSF2EmacState, MSS_EMAC,
+ TYPE_MSS_EMAC)
#define R_MAX (0x1a0 / 4)
#define PHY_MAX_REGS 32