Re: [PATCH 1/1] Add virtio-input driver.

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

 



On Mon, Mar 23, 2015 at 03:27:35PM +0100, Gerd Hoffmann wrote:
>   Hi,
> 
> > > > > You are doing leXXX everywhere, that's VERSION_1 dependency.
> > > > > virtio_cread will do byteswaps differently without VERSION_1.
> > > > > Just don't go there.
> 
> > So to clarify, you dislike using __virtio32 in virtio input header?
> 
> Well, as I understand things __virtio32 implies byteorder depends on
> whenever we are using VERSION_1 or not.  And non-transitional drivers
> should not need it as everything is by definition little endian.
> 
> So, yes, your suggestion to just require VERSION_1 in the driver implies
> in my eyes that there should be no reason to use __virtio32 instead of
> __le32.
> 
> Or do I miss something here?
> 
> cheers,
>   Gerd
> 

You are right but then if you do require VERSION_1 then
__virtio32 becomes identical to __le32.
There's some runtime overhead as we check on each access,
but it shouldn't matter here, right?
I guess we could add virtio_cread_le - is this what
you'd like?


-- 
MST
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux