On Fri, 28 Mar 2014 18:21:43 +0100
Andreas Färber <afaer...@suse.de> wrote:

> Am 28.03.2014 18:13, schrieb Greg Kurz:
> > On Fri, 28 Mar 2014 11:57:56 +0100
> > Greg Kurz <gk...@linux.vnet.ibm.com> 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                                     kurzg...@fr.ibm.com
                                                 gk...@linux.vnet.ibm.com
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