Re: [PATCH v1 2/4] Bluetooth: hci_intel: drop strange le16_to_cpu() against u8 values

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

 



Hi Andy,

> Sparse rightfully complains:
> 
>  hci_intel.c:696:26: warning: cast to restricted __le16
>  hci_intel.c:701:26: warning: cast to restricted __le16
>  hci_intel.c:702:26: warning: cast to restricted __le16
>  hci_intel.c:703:26: warning: cast to restricted __le16
>  hci_intel.c:725:26: warning: cast to restricted __le16
>  hci_intel.c:730:26: warning: cast to restricted __le16
>  hci_intel.c:731:26: warning: cast to restricted __le16
>  hci_intel.c:732:26: warning: cast to restricted __le16
> 
> because we access non-restricted types with le16_to_cpu().
> More confusion is added by using above against u8. On big-endian
> architecture we will get all zeroes. I bet it's not what should be
> in such case.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
> drivers/bluetooth/hci_intel.c | 14 ++++----------
> 1 file changed, 4 insertions(+), 10 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux