[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 01/58] e1000: Rename QOM class cast macros
From: |
Eduardo Habkost |
Subject: |
[PATCH v2 01/58] e1000: Rename QOM class cast macros |
Date: |
Wed, 19 Aug 2020 20:11:39 -0400 |
Rename the E1000_DEVICE_CLASS() and E1000_DEVICE_GET_CLASS()
macros to be consistent with the E1000() instance cast macro.
This will allow us to register the type cast macros using
OBJECT_DECLARE_TYPE later.
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Changes v1 -> v2: none
---
Cc: Jason Wang <jasowang@redhat.com>
Cc: qemu-devel@nongnu.org
---
hw/net/e1000.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/net/e1000.c b/hw/net/e1000.c
index a18f80e369..c4d896a9e6 100644
--- a/hw/net/e1000.c
+++ b/hw/net/e1000.c
@@ -151,9 +151,9 @@ typedef struct E1000BaseClass {
#define E1000(obj) \
OBJECT_CHECK(E1000State, (obj), TYPE_E1000_BASE)
-#define E1000_DEVICE_CLASS(klass) \
+#define E1000_CLASS(klass) \
OBJECT_CLASS_CHECK(E1000BaseClass, (klass), TYPE_E1000_BASE)
-#define E1000_DEVICE_GET_CLASS(obj) \
+#define E1000_GET_CLASS(obj) \
OBJECT_GET_CLASS(E1000BaseClass, (obj), TYPE_E1000_BASE)
static void
@@ -365,7 +365,7 @@ e1000_autoneg_timer(void *opaque)
static void e1000_reset(void *opaque)
{
E1000State *d = opaque;
- E1000BaseClass *edc = E1000_DEVICE_GET_CLASS(d);
+ E1000BaseClass *edc = E1000_GET_CLASS(d);
uint8_t *macaddr = d->conf.macaddr.a;
timer_del(d->autoneg_timer);
@@ -1751,7 +1751,7 @@ static void e1000_class_init(ObjectClass *klass, void
*data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
- E1000BaseClass *e = E1000_DEVICE_CLASS(klass);
+ E1000BaseClass *e = E1000_CLASS(klass);
const E1000Info *info = data;
k->realize = pci_e1000_realize;
--
2.26.2
- [PATCH v2 00/58] qom: Automated conversion of type checking boilerplate, Eduardo Habkost, 2020/08/19
- [PATCH v2 01/58] e1000: Rename QOM class cast macros,
Eduardo Habkost <=
- [PATCH v2 04/58] pl110: Rename pl110_version enum values, Eduardo Habkost, 2020/08/19
- [PATCH v2 02/58] megasas: Rename QOM class cast macros, Eduardo Habkost, 2020/08/19
- [PATCH v2 03/58] vmw_pvscsi: Rename QOM class cast macros, Eduardo Habkost, 2020/08/19
- [PATCH v2 05/58] allwinner-h3: Rename memmap enum constants, Eduardo Habkost, 2020/08/19
- [PATCH v2 06/58] aspeed_soc: Rename memmap/irqmap enum constants, Eduardo Habkost, 2020/08/19