[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 03/30] net/pcnet-pci: QOM Upcast Sweep
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH v2 03/30] net/pcnet-pci: QOM Upcast Sweep |
Date: |
Sun, 30 Jun 2013 13:24:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 |
Am 30.06.2013 09:34, schrieb Andreas Färber:
> Am 24.06.2013 08:52, schrieb address@hidden:
>> From: Peter Crosthwaite <address@hidden>
>>
>> Define and use standard QOM cast macro. Remove usages of DO_UPCAST
>> and direct -> style upcasting.
>>
>> Signed-off-by: Peter Crosthwaite <address@hidden>
>> ---
>>
>> hw/net/pcnet-pci.c | 14 +++++++++-----
>> 1 file changed, 9 insertions(+), 5 deletions(-)
>>
>> diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c
>> index 9df2b87..b1afbf4 100644
>> --- a/hw/net/pcnet-pci.c
>> +++ b/hw/net/pcnet-pci.c
>> @@ -43,6 +43,10 @@
>> //#define PCNET_DEBUG_TMD
>> //#define PCNET_DEBUG_MATCH
>>
>> +#define TYPE_PCI_PC_NET "pcnet"
>
> I'm wondering whether we should rename this PCNET rather than PC_NET,
> but I'm queuing it as is. Thanks,
Squashing the following.
Andreas
diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c
index b1afbf4..6ae27b4 100644
--- a/hw/net/pcnet-pci.c
+++ b/hw/net/pcnet-pci.c
@@ -49,7 +49,10 @@
OBJECT_CHECK(PCIPCNetState, (obj), TYPE_PCI_PC_NET)
typedef struct {
- PCIDevice pci_dev;
+ /*< private >*/
+ PCIDevice parent_obj;
+ /*< public >*/
+
PCNetState state;
MemoryRegion io_bar;
} PCIPCNetState;
@@ -240,7 +243,7 @@ static const VMStateDescription vmstate_pci_pcnet = {
.minimum_version_id = 2,
.minimum_version_id_old = 2,
.fields = (VMStateField []) {
- VMSTATE_PCI_DEVICE(pci_dev, PCIPCNetState),
+ VMSTATE_PCI_DEVICE(parent_obj, PCIPCNetState),
VMSTATE_STRUCT(state, PCIPCNetState, 0, vmstate_pcnet, PCNetState),
VMSTATE_END_OF_LIST()
}
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [PATCH v2 00/30] PCI: Cleanup legacy casts in device land, peter . crosthwaite, 2013/06/24
- [Qemu-devel] [PATCH v2 01/30] net/e1000: QOM Upcast Sweep, peter . crosthwaite, 2013/06/24
- [Qemu-devel] [PATCH v2 02/30] net/rtl8139: QOM Upcast Sweep, peter . crosthwaite, 2013/06/24
- [Qemu-devel] [PATCH v2 03/30] net/pcnet-pci: QOM Upcast Sweep, peter . crosthwaite, 2013/06/24
- [Qemu-devel] [PATCH v2 04/30] usb/hcd-xhci: QOM Upcast Sweep, peter . crosthwaite, 2013/06/24
- [Qemu-devel] [PATCH v2 05/30] scsi/lsi53c895a: QOM Upcast Sweep, peter . crosthwaite, 2013/06/24
- [Qemu-devel] [PATCH v2 06/30] scsi/megasas: QOM Upcast Sweep, peter . crosthwaite, 2013/06/24
- [Qemu-devel] [PATCH v2 07/30] scsi/esp-pci: QOM Upcast Sweep, peter . crosthwaite, 2013/06/24