Re: [v5 PATCH 1/4] bnx2fc: Header files

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

 



On Fri, 2011-01-28 at 18:00 -0800, Bhanu Gollapudi wrote:
> This patch contains header files for bnx2fc driver.

Do we have to have this litter of

#ifdef (__BIG_ENDIAN)
...
#else
...
#endif

throughout all the structures ... it really makes quite a mess, and is
very fragile (you have two entries to change and test each time, not
just one).  You can use the cpu neutral format for all the headers and
then use the cpu_to... accessors to make the conversions.

To see how to do all of this, here's an ancient driver that used to look
like yours and got converted:

http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commit;h=0353305208ae64b5d4a27957bb3e25c6045b3f68

James


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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux