Search Linux Wireless

Re: coding style lesson: iwlwifi vs. endianness

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

 



> Our case is
> 
> Loop:
>  my_big_little_endian_struct.
>  set little tiny bit in it
>  send to HW
> end

You could even code the "set little tiny bit in it" as

struct->flags |= cpu_to_le32(flag value);

which all other drivers do.

It boils down to what I just said:

Most people prefer making endian conversions explicit in the code while
you're hiding it in defines which is unintuitive if only because it
differs from what everybody else does.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux