mbox series

[0/7] hw: Few more QOM/QDev cleanups

Message ID 20231017140150.44995-1-philmd@linaro.org
Headers show
Series hw: Few more QOM/QDev cleanups | expand

Message

Philippe Mathieu-Daudé Oct. 17, 2023, 2:01 p.m. UTC
- Remove a pointless check,
- Use QOM cast macros,
- Declare QDev links statically using DEFINE_PROP_LINK()

Philippe Mathieu-Daudé (7):
  hw/virtio/virtio-pmem: Replace impossible check by assertion
  hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros
  hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro
  hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro
  hw/dma: Declare link using static DEFINE_PROP_LINK() macro
  hw/net: Declare link using static DEFINE_PROP_LINK() macro
  hw/usb: Declare link using static DEFINE_PROP_LINK() macro

 hw/block/vhost-user-blk.c |  4 ++--
 hw/display/virtio-gpu.c   |  2 +-
 hw/dma/xilinx_axidma.c    |  6 ++----
 hw/dma/xlnx-zdma.c        |  7 ++-----
 hw/dma/xlnx_csu_dma.c     | 13 ++++---------
 hw/net/cadence_gem.c      |  7 ++-----
 hw/scsi/virtio-scsi.c     |  2 +-
 hw/usb/hcd-xhci-sysbus.c  |  4 ----
 hw/usb/hcd-xhci.c         |  2 ++
 hw/virtio/virtio-pmem.c   |  5 +----
 10 files changed, 17 insertions(+), 35 deletions(-)

Comments

Michael S. Tsirkin Oct. 17, 2023, 2:09 p.m. UTC | #1
On Tue, Oct 17, 2023 at 04:01:43PM +0200, Philippe Mathieu-Daudé wrote:
> - Remove a pointless check,
> - Use QOM cast macros,
> - Declare QDev links statically using DEFINE_PROP_LINK()

virtio things
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>



> Philippe Mathieu-Daudé (7):
>   hw/virtio/virtio-pmem: Replace impossible check by assertion
>   hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros
>   hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro
>   hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro
>   hw/dma: Declare link using static DEFINE_PROP_LINK() macro
>   hw/net: Declare link using static DEFINE_PROP_LINK() macro
>   hw/usb: Declare link using static DEFINE_PROP_LINK() macro
> 
>  hw/block/vhost-user-blk.c |  4 ++--
>  hw/display/virtio-gpu.c   |  2 +-
>  hw/dma/xilinx_axidma.c    |  6 ++----
>  hw/dma/xlnx-zdma.c        |  7 ++-----
>  hw/dma/xlnx_csu_dma.c     | 13 ++++---------
>  hw/net/cadence_gem.c      |  7 ++-----
>  hw/scsi/virtio-scsi.c     |  2 +-
>  hw/usb/hcd-xhci-sysbus.c  |  4 ----
>  hw/usb/hcd-xhci.c         |  2 ++
>  hw/virtio/virtio-pmem.c   |  5 +----
>  10 files changed, 17 insertions(+), 35 deletions(-)
> 
> -- 
> 2.41.0
Philippe Mathieu-Daudé Oct. 19, 2023, 9:41 p.m. UTC | #2
On 17/10/23 16:01, Philippe Mathieu-Daudé wrote:

> Philippe Mathieu-Daudé (7):
>    hw/virtio/virtio-pmem: Replace impossible check by assertion
>    hw/block/vhost-user-blk: Use DEVICE() / VIRTIO_DEVICE() macros
>    hw/display/virtio-gpu: Use VIRTIO_DEVICE() macro
>    hw/scsi/virtio-scsi: Use VIRTIO_SCSI_COMMON() macro
>    hw/dma: Declare link using static DEFINE_PROP_LINK() macro
>    hw/net: Declare link using static DEFINE_PROP_LINK() macro

Patches 1-6 queued to hw-misc.