i2400m Endian Patch

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

 



Hi Doug

On Tue, 2010-12-07 at 14:21 -0800, Doug Kehn wrote: 
> Attached is a patch, for your review, to resolve an endian issue in
>  op-rfkill.c.  On a big-endian machine the following is emitted by the
>  driver:
> 
> i2400m_usb 2-1.3.1:1.0: HW BUG? Unknown RF SW state 0x2000000
> i2400m_usb 2-1.3.1:1.0: HW BUG? Unknown RF HW state 0x2000000
> 
> sw_rf_switch/hw_rf_switch (struct i2400m_tlv_rf_switches_status) are
>  define as __u8 so the le32_to_cpu() call isn't needed.  The patch
>  works correctly on a big-endian machine.  I didn't test it on a
>  little-endian machine  8(

Thanks, good catch. It was obviously wrong.

In your patch, however, there should be no casts. They are not really
necessary, and they will disallow the compiler to catch any changes in
typing if any was done in the future.

Do you want to resubmit your patch (adding if possible proper
attribution and formatting)? I can do it myself and put you in the
Signed-off-by line, if you wish.

Thanks!




[Index of Archives]     [Linux Kernel]     [Linux Wireless]     [Linux Bluetooth]     [Linux Netdev]     [Linux Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux