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 /include/hw/net | |
parent | a489d1951cd9cc91c5954214fcf6ae0f9d2d4292 (diff) | |
download | qemu-8063396bf3459a810d24e3efd6110b8480f0de5b.zip |
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 'include/hw/net')
-rw-r--r-- | include/hw/net/allwinner-sun8i-emac.h | 4 | ||||
-rw-r--r-- | include/hw/net/allwinner_emac.h | 4 | ||||
-rw-r--r-- | include/hw/net/cadence_gem.h | 4 | ||||
-rw-r--r-- | include/hw/net/ftgmac100.h | 8 | ||||
-rw-r--r-- | include/hw/net/imx_fec.h | 4 | ||||
-rw-r--r-- | include/hw/net/msf2-emac.h | 4 |
6 files changed, 7 insertions, 21 deletions
diff --git a/include/hw/net/allwinner-sun8i-emac.h b/include/hw/net/allwinner-sun8i-emac.h index 89e56b815b..460a58f1ca 100644 --- a/include/hw/net/allwinner-sun8i-emac.h +++ b/include/hw/net/allwinner-sun8i-emac.h @@ -30,9 +30,7 @@ */ #define TYPE_AW_SUN8I_EMAC "allwinner-sun8i-emac" -typedef struct AwSun8iEmacState AwSun8iEmacState; -DECLARE_INSTANCE_CHECKER(AwSun8iEmacState, AW_SUN8I_EMAC, - TYPE_AW_SUN8I_EMAC) +OBJECT_DECLARE_SIMPLE_TYPE(AwSun8iEmacState, AW_SUN8I_EMAC) /** @} */ diff --git a/include/hw/net/allwinner_emac.h b/include/hw/net/allwinner_emac.h index f5f5b67939..534e748982 100644 --- a/include/hw/net/allwinner_emac.h +++ b/include/hw/net/allwinner_emac.h @@ -31,9 +31,7 @@ #include "qom/object.h" #define TYPE_AW_EMAC "allwinner-emac" -typedef struct AwEmacState AwEmacState; -DECLARE_INSTANCE_CHECKER(AwEmacState, AW_EMAC, - TYPE_AW_EMAC) +OBJECT_DECLARE_SIMPLE_TYPE(AwEmacState, AW_EMAC) /* * Allwinner EMAC register list diff --git a/include/hw/net/cadence_gem.h b/include/hw/net/cadence_gem.h index 89d2dab513..91ebb5c8ae 100644 --- a/include/hw/net/cadence_gem.h +++ b/include/hw/net/cadence_gem.h @@ -27,9 +27,7 @@ #include "qom/object.h" #define TYPE_CADENCE_GEM "cadence_gem" -typedef struct CadenceGEMState CadenceGEMState; -DECLARE_INSTANCE_CHECKER(CadenceGEMState, CADENCE_GEM, - TYPE_CADENCE_GEM) +OBJECT_DECLARE_SIMPLE_TYPE(CadenceGEMState, 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 c6b1c11fca..765d1538a4 100644 --- a/include/hw/net/ftgmac100.h +++ b/include/hw/net/ftgmac100.h @@ -12,9 +12,7 @@ #include "qom/object.h" #define TYPE_FTGMAC100 "ftgmac100" -typedef struct FTGMAC100State FTGMAC100State; -DECLARE_INSTANCE_CHECKER(FTGMAC100State, FTGMAC100, - TYPE_FTGMAC100) +OBJECT_DECLARE_SIMPLE_TYPE(FTGMAC100State, FTGMAC100) #include "hw/sysbus.h" #include "net/net.h" @@ -70,9 +68,7 @@ struct FTGMAC100State { }; #define TYPE_ASPEED_MII "aspeed-mmi" -typedef struct AspeedMiiState AspeedMiiState; -DECLARE_INSTANCE_CHECKER(AspeedMiiState, ASPEED_MII, - TYPE_ASPEED_MII) +OBJECT_DECLARE_SIMPLE_TYPE(AspeedMiiState, ASPEED_MII) /* * AST2600 MII controller diff --git a/include/hw/net/imx_fec.h b/include/hw/net/imx_fec.h index ffdbc304b6..e3a8755db9 100644 --- a/include/hw/net/imx_fec.h +++ b/include/hw/net/imx_fec.h @@ -26,9 +26,7 @@ #include "qom/object.h" #define TYPE_IMX_FEC "imx.fec" -typedef struct IMXFECState IMXFECState; -DECLARE_INSTANCE_CHECKER(IMXFECState, IMX_FEC, - TYPE_IMX_FEC) +OBJECT_DECLARE_SIMPLE_TYPE(IMXFECState, IMX_FEC) #define TYPE_IMX_ENET "imx.enet" diff --git a/include/hw/net/msf2-emac.h b/include/hw/net/msf2-emac.h index 68194d798c..846ba6e6dc 100644 --- a/include/hw/net/msf2-emac.h +++ b/include/hw/net/msf2-emac.h @@ -29,9 +29,7 @@ #include "qom/object.h" #define TYPE_MSS_EMAC "msf2-emac" -typedef struct MSF2EmacState MSF2EmacState; -DECLARE_INSTANCE_CHECKER(MSF2EmacState, MSS_EMAC, - TYPE_MSS_EMAC) +OBJECT_DECLARE_SIMPLE_TYPE(MSF2EmacState, MSS_EMAC) #define R_MAX (0x1a0 / 4) #define PHY_MAX_REGS 32 |