[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 03/12] virtio-ccw: remove vdev field
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH v2 03/12] virtio-ccw: remove vdev field |
Date: |
Tue, 15 Oct 2013 17:19:00 +0200 |
On Tue, 15 Oct 2013 16:52:44 +0200
Paolo Bonzini <address@hidden> wrote:
> The vdev field is complicated to synchronize. Just access the
> BusState's list of children.
>
> Cc: address@hidden
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> hw/s390x/virtio-ccw.c | 80
> ++++++++++++++++++++++++++++-----------------------
> hw/s390x/virtio-ccw.h | 1 -
> 2 files changed, 44 insertions(+), 37 deletions(-)
>
> diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
> index a6accdf..753b7e1 100644
> --- a/hw/s390x/virtio-ccw.c
> +++ b/hw/s390x/virtio-ccw.c
> @@ -230,6 +236,7 @@ static int virtio_ccw_cb(SubchDev *sch, CCW1 ccw)
> hwaddr indicators;
> VqConfigBlock vq_config;
> VirtioCcwDevice *dev = sch->driver_data;
> + VirtIODevice *vdev = virtio_bus_get_device(&dev->bus);
You dereference dev before it is checked against NULL. While that
should not happen, I'd prefer virtio_ccw_get_vdev() instead.
> bool check_len;
> int len;
> hwaddr hw_len;
Otherwise:
Reviewed-by: Cornelia Huck <address@hidden>
[Qemu-devel] [PATCH v2 05/12] virtio-bus: cleanup plug/unplug interface, Paolo Bonzini, 2013/10/15
[Qemu-devel] [PATCH v2 06/12] virtio-blk: switch exit callback to VirtioDeviceClass, Paolo Bonzini, 2013/10/15
[Qemu-devel] [PATCH v2 07/12] virtio-serial: switch exit callback to VirtioDeviceClass, Paolo Bonzini, 2013/10/15