qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to acce


From: Greg Kurz
Subject: Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers
Date: Fri, 28 Mar 2014 18:37:29 +0100

On Fri, 28 Mar 2014 18:21:43 +0100
Andreas Färber <address@hidden> wrote:

> Am 28.03.2014 18:13, schrieb Greg Kurz:
> > On Fri, 28 Mar 2014 11:57:56 +0100
> > Greg Kurz <address@hidden> wrote:
> >> @@ -519,8 +521,8 @@ static void virtio_scsi_push_event(VirtIOSCSI *s, 
> >> SCSIDevice *dev,
> >>
> >>      evt = req->resp.event;
> >>      memset(evt, 0, sizeof(VirtIOSCSIEvent));
> >> -    evt->event = event;
> >> -    evt->reason = reason;
> >> +    evt->event = virtio_tswap32(event);
> >> +    evt->reason = virtio_tswap32(reason);
> > 
> > My bad again, it should be:
> > 
> >  +    evt->event = virtio_tswap32(event, vdev);
> >  +    evt->reason = virtio_tswap32(reason, vdev);
> 
> Pure bikeshedding, but wouldn't it make sense to have the vdev as first
> argument?
> 

I have thought about it also... it would make sense to do the same with
all the other helpers in virtio-access.h then.

And while we are at it, since we pass &address_space_memory to all occurences
of virtio_*_phys() and I don't see why we would change that, maybe we
can also move that into the helpers. Thoughts ?

> Regards,
> Andreas
> 

Thanks.

-- 
Gregory Kurz                                     address@hidden
                                                 address@hidden
Software Engineer @ IBM/Meiosys                  http://www.ibm.com
Tel +33 (0)562 165 496

"Anarchy is about taking complete responsibility for yourself."
        Alan Moore.




reply via email to

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