[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 15/58] tulip: Move TulipState typedef to header
From: |
Eduardo Habkost |
Subject: |
[PATCH v2 15/58] tulip: Move TulipState typedef to header |
Date: |
Wed, 19 Aug 2020 20:11:53 -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: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes v1 -> v2: none
---
Cc: Sven Schnelle <svens@stackframe.org>
Cc: Jason Wang <jasowang@redhat.com>
Cc: qemu-devel@nongnu.org
---
hw/net/tulip.h | 1 +
hw/net/tulip.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/net/tulip.h b/hw/net/tulip.h
index 5271aad8d5..c3fcd4d4e1 100644
--- a/hw/net/tulip.h
+++ b/hw/net/tulip.h
@@ -5,6 +5,7 @@
#include "net/net.h"
#define TYPE_TULIP "tulip"
+typedef struct TULIPState TULIPState;
#define TULIP(obj) OBJECT_CHECK(TULIPState, (obj), TYPE_TULIP)
#define CSR(_x) ((_x) << 3)
diff --git a/hw/net/tulip.c b/hw/net/tulip.c
index 4487fd61cf..ca69f7ea5e 100644
--- a/hw/net/tulip.c
+++ b/hw/net/tulip.c
@@ -18,7 +18,7 @@
#include "trace.h"
#include "net/eth.h"
-typedef struct TULIPState {
+struct TULIPState {
PCIDevice dev;
MemoryRegion io;
MemoryRegion memory;
@@ -44,7 +44,7 @@ typedef struct TULIPState {
uint32_t rx_status;
uint8_t filter[16][6];
-} TULIPState;
+};
static const VMStateDescription vmstate_pci_tulip = {
.name = "tulip",
--
2.26.2
- Re: [PATCH v2 07/58] opentitan: Rename memmap enum constants, (continued)
- [PATCH v2 09/58] sifive_u: Rename memmap enum constants, Eduardo Habkost, 2020/08/19
- [PATCH v2 10/58] aspeed_timer: Fix ASPEED_TIMER macro definition, Eduardo Habkost, 2020/08/19
- [PATCH v2 11/58] versatile: Fix typo in PCI_VPB_HOST definition, Eduardo Habkost, 2020/08/19
- [PATCH v2 12/58] virtio-ccw: Fix definition of VIRTIO_CCW_BUS_GET_CLASS, Eduardo Habkost, 2020/08/19
- [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 <=
- [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, 2020/08/19
- [PATCH v2 22/58] can_emu: Delete macros for non-existing typedef, Eduardo Habkost, 2020/08/19