All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Konrad <fred.konrad@greensocs.com>
To: peter.crosthwaite@xilinx.com
Cc: pbonzini@redhat.com, aliguori@us.ibm.com, qemu-devel@nongnu.org,
	afaerber@suse.de
Subject: Re: [Qemu-devel] [RFT PATCH v1 12/30] virtio/virtio-pci: QOM casting sweep
Date: Tue, 11 Jun 2013 09:09:29 +0200	[thread overview]
Message-ID: <51B6CD29.5040608@greensocs.com> (raw)
In-Reply-To: <2015a3db86888f2c28f4023ccf196a02c2196762.1370931825.git.peter.crosthwaite@xilinx.com>

Hi,

On 11/06/2013 08:49, peter.crosthwaite@xilinx.com wrote:
> From: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
>
> Use standard QOM cast macro. Remove usages of container_of() and
> direct -> style upcasting.
>
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
[...]
>   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?
>   
>   /* DeviceState to VirtIOPCIProxy. Note: used on datapath,
> @@ -106,7 +106,7 @@ static inline VirtIOPCIProxy *to_virtio_pci_proxy(DeviceState *d)
>    */
>   static inline VirtIOPCIProxy *to_virtio_pci_proxy_fast(DeviceState *d)
>   {
> -    return container_of(d, VirtIOPCIProxy, pci_dev.qdev);
> +    return VIRTIO_PCI(d);
>   }
>   
>   static void virtio_pci_notify(DeviceState *d, uint16_t vector)

  reply	other threads:[~2013-06-11  7:09 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-11  6:40 [Qemu-devel] [RFT PATCH v1 00/30] PCI: Cleanup legacy casts in device land peter.crosthwaite
2013-06-11  6:40 ` [Qemu-devel] [RFT PATCH v1 01/30] net/e1000: QOM Upcast Sweep peter.crosthwaite
2013-06-24  3:42   ` Peter Crosthwaite
2013-06-11  6:41 ` [Qemu-devel] [RFT PATCH v1 02/30] net/rtl8139: " peter.crosthwaite
2013-06-11  6:42 ` [Qemu-devel] [RFT PATCH v1 03/30] net/pcnet-pci: " peter.crosthwaite
2013-06-11  6:43 ` [Qemu-devel] [RFT PATCH v1 04/30] usb/hcd-xhci: " peter.crosthwaite
2013-06-11  6:43 ` [Qemu-devel] [RFT PATCH v1 05/30] scsi/lsi53c895a: " peter.crosthwaite
2013-06-11  6:44 ` [Qemu-devel] [RFT PATCH v1 06/30] scsi/megasas: " peter.crosthwaite
2013-06-24  3:42   ` Peter Crosthwaite
2013-06-11  6:45 ` [Qemu-devel] [RFT PATCH v1 07/30] scsi/esp-pci: " peter.crosthwaite
2013-06-11  6:46 ` [Qemu-devel] [RFT PATCH v1 08/30] ide/ich: " peter.crosthwaite
2013-06-11  6:46 ` [Qemu-devel] [RFT PATCH v1 09/30] ide/piix: QOM casting sweep peter.crosthwaite
2013-06-11  6:47 ` [Qemu-devel] [RFT PATCH v1 10/30] acpi/piix4: QOM Upcast Sweep peter.crosthwaite
2013-06-11  6:48 ` [Qemu-devel] [RFT PATCH v1 11/30] misc/pci-testdev: " peter.crosthwaite
2013-06-11  6:49 ` [Qemu-devel] [RFT PATCH v1 12/30] virtio/virtio-pci: QOM casting sweep peter.crosthwaite
2013-06-11  7:09   ` Frederic Konrad [this message]
2013-06-24  5:00     ` Peter Crosthwaite
2013-06-11  6:49 ` [Qemu-devel] [RFT PATCH v1 13/30] virtio/vmware_vga: " peter.crosthwaite
2013-06-11  6:50 ` [Qemu-devel] [RFT PATCH v1 14/30] misc/ivshmem: QOM Upcast Sweep peter.crosthwaite
2013-06-11  6:51 ` [Qemu-devel] [RFT PATCH v1 15/30] xen/xen_platform: QOM casting sweep peter.crosthwaite
2013-06-11  6:52 ` [Qemu-devel] [RFT PATCH v1 16/30] isa/*: " peter.crosthwaite
2013-06-11  9:58   ` Andreas Färber
2013-06-24  4:55     ` Peter Crosthwaite
2013-06-11  6:52 ` [Qemu-devel] [RFT PATCH v1 17/30] pci/*: " peter.crosthwaite
2013-06-11  6:53 ` [Qemu-devel] [RFT PATCH v1 18/30] pci-bridge/pci_bridge_dev: Don't use DO_UPCAST peter.crosthwaite
2013-06-11  6:54 ` [Qemu-devel] [RFT PATCH v1 19/30] pci-bridge/*: substitute ->qdev casts with DEVICE() peter.crosthwaite
2013-06-11  6:55 ` [Qemu-devel] [RFT PATCH v1 20/30] misc/vfio: " peter.crosthwaite
2013-06-11  6:55 ` [Qemu-devel] [RFT PATCH v1 21/30] net/eepro100: " peter.crosthwaite
2013-06-11  6:56 ` [Qemu-devel] [RFT PATCH v1 22/30] net/ne2000: " peter.crosthwaite
2013-06-11  6:57 ` [Qemu-devel] [RFT PATCH v1 23/30] usb/*: " peter.crosthwaite
2013-06-11  6:58 ` [Qemu-devel] [RFT PATCH v1 24/30] watchdog/wdt_i6300esb: " peter.crosthwaite
2013-06-11  6:58 ` [Qemu-devel] [RFT PATCH v1 25/30] scsi/vmw_pvscsi: " peter.crosthwaite
2013-06-11  6:59 ` [Qemu-devel] [RFT PATCH v1 26/30] i2c/smbus_ich9: " peter.crosthwaite
2013-06-11  7:00 ` [Qemu-devel] [RFT PATCH v1 27/30] ide/cmd646: " peter.crosthwaite
2013-06-11  7:01 ` [Qemu-devel] [RFT PATCH v1 28/30] ide/via: " peter.crosthwaite
2013-06-11  7:01 ` [Qemu-devel] [RFT PATCH v1 29/30] pci-host/*: " peter.crosthwaite
2013-06-11  7:02 ` [Qemu-devel] [RFT PATCH v1 30/30] i386/*: " peter.crosthwaite

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51B6CD29.5040608@greensocs.com \
    --to=fred.konrad@greensocs.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.