qemu-stable
[Top][All Lists]
Advanced

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

Re: [Qemu-stable] [PATCH v2 03/12] virtio-ccw: remove vdev field


From: Paolo Bonzini
Subject: Re: [Qemu-stable] [PATCH v2 03/12] virtio-ccw: remove vdev field
Date: Tue, 15 Oct 2013 17:59:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

Il 15/10/2013 17:19, Cornelia Huck ha scritto:
> 
>> > 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.
> 

Thanks, will do.

Paolo



reply via email to

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