Re: [PATCH RFC 06/11] media: vidtv: get rid of some endiannes nonsense

Daniel W. S. Almeida
2020-09-14T16:41:57Z

Hi Mauro,

> Genmask is always highest order to low order. It doesn't make
> any sense to make it depends on endiannes.
>

I added these #ifdefs due to this:

https://lwn.net/Articles/741762/

i.e.

Fields to access are specified as GENMASK() values - an N-bit field
starting at bit #M is encoded as GENMASK(M + N - 1, N). Note that
bit numbers refer to endianness of the object we are working with -
e.g. GENMASK(11, 0) in __be16 refers to the second byte and the lower
4 bits of the first byte. In __le16 it would refer to the first byte
and the lower 4 bits of the second byte, etc.

I am not 100% sure, but maybe we actually need them?

- Daniel