[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
- [Qemu-devel] [RFT PATCH v1 05/30] scsi/lsi53c895a: QOM Upcast Sweep, (continued)
- [Qemu-devel] [RFT PATCH v1 05/30] scsi/lsi53c895a: QOM Upcast Sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 06/30] scsi/megasas: QOM Upcast Sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 07/30] scsi/esp-pci: QOM Upcast Sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 08/30] ide/ich: QOM Upcast Sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 09/30] ide/piix: QOM casting sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 10/30] acpi/piix4: QOM Upcast Sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 11/30] misc/pci-testdev: QOM Upcast Sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 12/30] virtio/virtio-pci: QOM casting sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 13/30] virtio/vmware_vga: QOM casting sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 14/30] misc/ivshmem: QOM Upcast Sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 15/30] xen/xen_platform: QOM casting sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 16/30] isa/*: QOM casting sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 17/30] pci/*: QOM casting sweep, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 18/30] pci-bridge/pci_bridge_dev: Don't use DO_UPCAST, peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 19/30] pci-bridge/*: substitute ->qdev casts with DEVICE(), peter . crosthwaite, 2013/06/11
- [Qemu-devel] [RFT PATCH v1 20/30] misc/vfio: substitute ->qdev casts with DEVICE(), peter . crosthwaite, 2013/06/11