qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFT PATCH v1 12/30] virtio/virtio-pci: QOM casting swe


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] [RFT PATCH v1 12/30] virtio/virtio-pci: QOM casting sweep
Date: Mon, 24 Jun 2013 15:00:20 +1000

Hi Frederic,

On Tue, Jun 11, 2013 at 5:09 PM, Frederic Konrad
<address@hidden> wrote:
> Hi,
>
>
> On 11/06/2013 08:49, address@hidden wrote:
>>
>> From: Peter Crosthwaite <address@hidden>
>>
>> Use standard QOM cast macro. Remove usages of container_of() and
>> direct -> style upcasting.
>>
>> Signed-off-by: Peter Crosthwaite <address@hidden>
>
> [...]
>
>>   static inline VirtIOPCIProxy *to_virtio_pci_proxy(DeviceState *d)
>>   {
>> -    return container_of(d, VirtIOPCIProxy, pci_dev.qdev);
>> +    return VIRTIO_PCI(d);
>>   }
>
>
> Maybe you can replace each to_virtio_pci_proxy directly with VIRTIO_PCI?
>

I'm going to drop this one V2 for the moment and revisit is later. Its
more complicated, given the replications between the fast and slow
versions and needs a little more research (and a mini series of its
own).

Regards,
Peter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]