[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 51/51] hw/net/eepro100: Replace DO_UPCAST(EEPRO100State) by EEPRO1
From: |
Jason Wang |
Subject: |
[PULL 51/51] hw/net/eepro100: Replace DO_UPCAST(EEPRO100State) by EEPRO100() |
Date: |
Tue, 7 Mar 2023 15:08:16 +0800 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Use the EEPRO100() QOM type-checking macro to avoid DO_UPCAST().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
hw/net/eepro100.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/net/eepro100.c b/hw/net/eepro100.c
index bce3776..6db15f1 100644
--- a/hw/net/eepro100.c
+++ b/hw/net/eepro100.c
@@ -1834,7 +1834,7 @@ static const VMStateDescription vmstate_eepro100 = {
static void pci_nic_uninit(PCIDevice *pci_dev)
{
- EEPRO100State *s = DO_UPCAST(EEPRO100State, dev, pci_dev);
+ EEPRO100State *s = EEPRO100(pci_dev);
vmstate_unregister(VMSTATE_IF(&pci_dev->qdev), s->vmstate, s);
g_free(s->vmstate);
@@ -1850,7 +1850,7 @@ static NetClientInfo net_eepro100_info = {
static void e100_nic_realize(PCIDevice *pci_dev, Error **errp)
{
- EEPRO100State *s = DO_UPCAST(EEPRO100State, dev, pci_dev);
+ EEPRO100State *s = EEPRO100(pci_dev);
TRACE(OTHER, logout("\n"));
@@ -1891,7 +1891,7 @@ static void e100_nic_realize(PCIDevice *pci_dev, Error
**errp)
static void eepro100_instance_init(Object *obj)
{
- EEPRO100State *s = DO_UPCAST(EEPRO100State, dev, PCI_DEVICE(obj));
+ EEPRO100State *s = EEPRO100(obj);
device_add_bootindex_property(obj, &s->conf.bootindex,
"bootindex", "/ethernet-phy@0",
DEVICE(s));
--
2.7.4
- [PULL 45/51] hw/net/eepro100: Abort if pci_add_capability() ever fail, (continued)
- [PULL 45/51] hw/net/eepro100: Abort if pci_add_capability() ever fail, Jason Wang, 2023/03/07
- [PULL 44/51] ebpf: fix compatibility with libbpf 1.0+, Jason Wang, 2023/03/07
- [PULL 48/51] hw/net/eepro100: Pass E100PCIDeviceInfo as class init data, Jason Wang, 2023/03/07
- [PULL 47/51] hw/net/eepro100: Convert reset handler to DeviceReset, Jason Wang, 2023/03/07
- [PULL 43/51] docs/system/devices/igb: Add igb documentation, Jason Wang, 2023/03/07
- [PULL 40/51] tests/qtest/libqos/e1000e: Export macreg functions, Jason Wang, 2023/03/07
- [PULL 50/51] hw/net/eepro100: Remove instance's EEPRO100State::device, Jason Wang, 2023/03/07
- [PULL 49/51] hw/net/eepro100: Remove instance EEPRO100State::has_extended_tcb_support, Jason Wang, 2023/03/07
- [PULL 41/51] igb: Introduce qtest for igb device, Jason Wang, 2023/03/07
- [PULL 46/51] hw/net/eepro100: Introduce TYPE_EEPRO100 QOM abstract parent, Jason Wang, 2023/03/07
- [PULL 51/51] hw/net/eepro100: Replace DO_UPCAST(EEPRO100State) by EEPRO100(),
Jason Wang <=
- Re: [PULL 00/51] Net patches, Peter Maydell, 2023/03/07
- Re: [PULL 00/51] Net patches, Philippe Mathieu-Daudé, 2023/03/07
- Re: [PULL 00/51] Net patches, Jason Wang, 2023/03/08
- Re: [PULL 00/51] Net patches, Philippe Mathieu-Daudé, 2023/03/08
- Re: [PULL 00/51] Net patches, Michael S. Tsirkin, 2023/03/08
- Re: [PULL 00/51] Net patches, Philippe Mathieu-Daudé, 2023/03/08
- Re: [PULL 00/51] Net patches, Michael S. Tsirkin, 2023/03/08
- Re: [PULL 00/51] Net patches, Jason Wang, 2023/03/08
Re: [PULL 00/51] Net patches, Jason Wang, 2023/03/08