Am 30.06.2013 09:34, schrieb Andreas Färber:
> Am 24.06.2013 08:52, schrieb peter.crosthwa...@xilinx.com:
>> From: Peter Crosthwaite <peter.crosthwa...@xilinx.com>
>>
>> Define and use standard QOM cast macro. Remove usages of DO_UPCAST
>> and direct -> style upcasting.
>>
>> Signed-off-by: Peter Crosthwaite <peter.crosthwa...@xilinx.com>
>> ---
>>
>>  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

Reply via email to