[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 20/58] mcf_fec: Move mcf_fec_state typedef to header
From: |
Eduardo Habkost |
Subject: |
[PATCH v2 20/58] mcf_fec: Move mcf_fec_state typedef to header |
Date: |
Wed, 19 Aug 2020 20:11:58 -0400 |
Move typedef closer to the type check macros, to make it easier
to convert the code to OBJECT_DEFINE_TYPE() in the future.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes v1 -> v2: none
---
Cc: Thomas Huth <huth@tuxfamily.org>
Cc: Jason Wang <jasowang@redhat.com>
Cc: qemu-devel@nongnu.org
---
include/hw/m68k/mcf_fec.h | 1 +
hw/net/mcf_fec.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/hw/m68k/mcf_fec.h b/include/hw/m68k/mcf_fec.h
index eeb471f9c9..c09e33a57c 100644
--- a/include/hw/m68k/mcf_fec.h
+++ b/include/hw/m68k/mcf_fec.h
@@ -11,6 +11,7 @@
#define HW_M68K_MCF_FEC_H
#define TYPE_MCF_FEC_NET "mcf-fec"
+typedef struct mcf_fec_state mcf_fec_state;
#define MCF_FEC_NET(obj) OBJECT_CHECK(mcf_fec_state, (obj), TYPE_MCF_FEC_NET)
#define FEC_NUM_IRQ 13
diff --git a/hw/net/mcf_fec.c b/hw/net/mcf_fec.c
index 281345862c..25e3e453ab 100644
--- a/hw/net/mcf_fec.c
+++ b/hw/net/mcf_fec.c
@@ -32,7 +32,7 @@ do { printf("mcf_fec: " fmt , ## __VA_ARGS__); } while (0)
#define FEC_MAX_FRAME_SIZE 2032
#define FEC_MIB_SIZE 64
-typedef struct {
+struct mcf_fec_state {
SysBusDevice parent_obj;
MemoryRegion iomem;
@@ -56,7 +56,7 @@ typedef struct {
uint32_t etdsr;
uint32_t emrbr;
uint32_t mib[FEC_MIB_SIZE];
-} mcf_fec_state;
+};
#define FEC_INT_HB 0x80000000
#define FEC_INT_BABR 0x40000000
--
2.26.2
- [PATCH v2 13/58] hvf: Add missing include, (continued)
- [PATCH v2 13/58] hvf: Add missing include, Eduardo Habkost, 2020/08/19
- [PATCH v2 14/58] hcd-dwc2: Rename USB_*CLASS macros for consistency, Eduardo Habkost, 2020/08/19
- [PATCH v2 15/58] tulip: Move TulipState typedef to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 16/58] throttle-groups: Move ThrottleGroup typedef to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 17/58] pci: Move PCIBusClass typedef to pci.h, Eduardo Habkost, 2020/08/19
- [PATCH v2 18/58] i8254: Move PITCommonState/PITCommonClass typedefs to i8254.h, Eduardo Habkost, 2020/08/19
- [PATCH v2 19/58] hvf: Move HVFState typedef to hvf.h, Eduardo Habkost, 2020/08/19
- [PATCH v2 20/58] mcf_fec: Move mcf_fec_state typedef to header,
Eduardo Habkost <=
- [PATCH v2 22/58] can_emu: Delete macros for non-existing typedef, Eduardo Habkost, 2020/08/19
- [PATCH v2 21/58] s390_flic: Move KVMS390FLICState typedef to header, Eduardo Habkost, 2020/08/19
- [PATCH v2 23/58] nubus: Delete unused NUBUS_BRIDGE macro, Eduardo Habkost, 2020/08/19
- [PATCH v2 25/58] armsse: Rename QOM macros to avoid conflicts, Eduardo Habkost, 2020/08/19
- [PATCH v2 24/58] platform-bus: Delete macros for non-existing typedef, Eduardo Habkost, 2020/08/19
- [PATCH v2 26/58] xen-legacy-backend: Add missing typedef XenLegacyDevice, Eduardo Habkost, 2020/08/19