Pkshih <[email protected]> writes:

> On Fri, 2018-06-29 at 10:30 +0300, Kalle Valo wrote:
>> Pkshih <[email protected]> writes:
>> 
>> > On Tue, 2018-05-29 at 08:18 +0300, Kalle Valo wrote:
>> >> <[email protected]> writes:
>> >> 
>> >
>> > Because C2H data is little endian order, the struct will look like
>> > struct foo {
>> > #ifdef __LITTLE_ENDIAN
>> >    u8 bar:4;
>> >    u8 koo:4;
>> > #else
>> >    u8 koo:4;
>> >    u8 bar:4;
>> > #endif
>> > }
>> 
>> With u8 you don't need endian check, right? I would assume that with
>> both little and big endian bar and koo would be in the same place.
>
> I think u8 with bitfield would be different between little and big endian
> machines.

To me that does not make any sense, I have never heard about bit
endianness any of the devices I have worked on.

https://en.wikipedia.org/wiki/Endianness

-- 
Kalle Valo

Reply via email to