From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Roman Bolshakov" <r.bolshakov@yadro.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Igor Mammedov" <imammedo@redhat.com>
Subject: [PULL 02/53] e1000: Rename QOM class cast macros
Date: Thu, 27 Aug 2020 15:20:31 -0400 [thread overview]
Message-ID: <20200827192122.658035-3-ehabkost@redhat.com> (raw)
In-Reply-To: <20200827192122.658035-1-ehabkost@redhat.com>
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>
Tested-By: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20200825192110.3528606-2-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
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
next prev parent reply other threads:[~2020-08-27 19:35 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 19:20 [PULL 00/53] Machine queue + QOM fixes and cleanups Eduardo Habkost
2020-08-27 19:20 ` [PULL 01/53] numa: hmat: fix cache size check Eduardo Habkost
2020-08-27 19:20 ` Eduardo Habkost [this message]
2020-08-27 19:20 ` [PULL 03/53] megasas: Rename QOM class cast macros Eduardo Habkost
2020-08-27 19:20 ` [PULL 04/53] vmw_pvscsi: " Eduardo Habkost
2020-08-27 19:20 ` [PULL 05/53] pl110: Rename pl110_version enum values Eduardo Habkost
2020-08-27 19:20 ` [PULL 06/53] allwinner-h3: Rename memmap enum constants Eduardo Habkost
2020-08-27 19:20 ` [PULL 07/53] aspeed_soc: Rename memmap/irqmap " Eduardo Habkost
2020-08-27 19:20 ` [PULL 08/53] opentitan: Rename memmap " Eduardo Habkost
2020-08-27 19:20 ` [PULL 09/53] aspeed_timer: Fix ASPEED_TIMER macro definition Eduardo Habkost
2020-08-27 19:20 ` [PULL 10/53] versatile: Fix typo in PCI_VPB_HOST definition Eduardo Habkost
2020-08-27 19:20 ` [PULL 11/53] virtio-ccw: Fix definition of VIRTIO_CCW_BUS_GET_CLASS Eduardo Habkost
2020-08-27 19:20 ` [PULL 12/53] hvf: Add missing include Eduardo Habkost
2020-08-27 19:20 ` [PULL 13/53] hcd-dwc2: Rename USB_*CLASS macros for consistency Eduardo Habkost
2020-08-27 19:20 ` [PULL 14/53] tulip: Move TulipState typedef to header Eduardo Habkost
2020-08-27 19:20 ` [PULL 15/53] throttle-groups: Move ThrottleGroup " Eduardo Habkost
2020-08-27 19:20 ` [PULL 16/53] pci: Move PCIBusClass typedef to pci.h Eduardo Habkost
2020-08-27 19:20 ` [PULL 17/53] i8254: Move PITCommonState/PITCommonClass typedefs to i8254.h Eduardo Habkost
2020-08-27 19:20 ` [PULL 18/53] hvf: Move HVFState typedef to hvf.h Eduardo Habkost
2020-08-27 19:20 ` [PULL 19/53] mcf_fec: Move mcf_fec_state typedef to header Eduardo Habkost
2020-08-27 19:20 ` [PULL 20/53] s390_flic: Move KVMS390FLICState " Eduardo Habkost
2020-08-27 19:20 ` [PULL 21/53] can_emu: Delete macros for non-existing typedef Eduardo Habkost
2020-08-27 19:20 ` [PULL 22/53] nubus: Delete unused NUBUS_BRIDGE macro Eduardo Habkost
2020-08-27 19:20 ` [PULL 23/53] platform-bus: Delete macros for non-existing typedef Eduardo Habkost
2020-08-27 19:20 ` [PULL 24/53] armsse: Rename QOM macros to avoid conflicts Eduardo Habkost
2020-08-27 19:20 ` [PULL 25/53] xen-legacy-backend: Add missing typedef XenLegacyDevice Eduardo Habkost
2020-08-27 19:20 ` [PULL 26/53] spapr: Move typedef SpaprMachineState to spapr.h Eduardo Habkost
2020-08-27 19:20 ` [PULL 27/53] s390x: Move typedef SCLPEventFacility to event-facility.h Eduardo Habkost
2020-08-27 19:20 ` [PULL 28/53] vhost-user-gpu: Move QOM macro to header Eduardo Habkost
2020-08-27 19:20 ` [PULL 29/53] ahci: Move QOM macros " Eduardo Habkost
2020-08-27 19:20 ` [PULL 30/53] i8257: Move QOM macro " Eduardo Habkost
2020-08-27 19:21 ` [PULL 31/53] ahci: " Eduardo Habkost
2020-08-27 19:21 ` [PULL 32/53] pckbd: " Eduardo Habkost
2020-08-27 19:21 ` [PULL 33/53] vmbus: Move QOM macros to vmbus.h Eduardo Habkost
2020-08-27 19:21 ` [PULL 34/53] virtio-serial-bus: Move QOM macros to header Eduardo Habkost
2020-08-27 19:21 ` [PULL 35/53] piix: " Eduardo Habkost
2020-08-27 19:21 ` [PULL 36/53] auxbus: " Eduardo Habkost
2020-08-27 19:21 ` [PULL 37/53] rocker: " Eduardo Habkost
2020-08-27 19:21 ` [PULL 38/53] pxa2xx: " Eduardo Habkost
2020-08-27 19:21 ` [PULL 39/53] mptsas: " Eduardo Habkost
2020-08-27 19:21 ` [PULL 40/53] kvm: Move QOM macros to kvm.h Eduardo Habkost
2020-08-27 19:21 ` [PULL 41/53] vfio/pci: Move QOM macros to header Eduardo Habkost
2020-08-27 19:21 ` [PULL 42/53] nubus: Rename class type checking macros Eduardo Habkost
2020-08-27 19:21 ` [PULL 43/53] s390-virtio-ccw: Rename S390_MACHINE_CLASS macro Eduardo Habkost
2020-08-27 19:21 ` [PULL 44/53] swim: Rename struct SWIM to Swim Eduardo Habkost
2020-08-27 19:21 ` [PULL 45/53] migration: Rename class type checking macros Eduardo Habkost
2020-08-27 19:21 ` [PULL 46/53] etsec: Use TYPE_ETSEC_COMMON constant Eduardo Habkost
2020-08-27 19:21 ` [PULL 47/53] nios2_iic: Use TYPE_ALTERA_IIC constant Eduardo Habkost
2020-08-27 19:21 ` [PULL 48/53] amd_iommu: Use TYPE_AMD_IOMMU_PCI constant Eduardo Habkost
2020-08-27 19:21 ` [PULL 49/53] sclpconsole: Use TYPE_* constants Eduardo Habkost
2020-08-27 19:21 ` [PULL 50/53] xlnx-zcu102: Use TYPE_ZCU102_MACHINE constant Eduardo Habkost
2020-08-27 19:21 ` [PULL 51/53] tosa: Use TYPE_TOSA_MISC_GPIO constant Eduardo Habkost
2020-08-27 19:21 ` [PULL 52/53] ppce500: Use TYPE_PPC_E500_PCI_BRIDGE constant Eduardo Habkost
2020-08-27 19:21 ` [PULL 53/53] dc390: Use TYPE_DC390_DEVICE constant Eduardo Habkost
2020-08-28 11:32 ` [PULL 00/53] Machine queue + QOM fixes and cleanups Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200827192122.658035-3-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=berrange@redhat.com \
--cc=imammedo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=r.bolshakov@yadro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).