staging:rtl8723au: Fix sparse warning cast to restricted __le16
authorTobenna P. Igwe <ptigwe@gmail.com>
Tue, 18 Nov 2014 01:45:41 +0000 (01:45 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Nov 2014 20:43:45 +0000 (12:43 -0800)
This patch fixes the following sparse warning:

drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c:343:36: warning:
cast to restricted __le16

by using the le16_to_cpus function.

Signed-off-by: Tobenna P. Igwe <ptigwe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c

index d80ea4ee39e96bc3860bf0f8a44cf4272538abbb..78665eec3c1dc92fc149c5b9d606a3b909e16e24 100644 (file)
@@ -340,7 +340,7 @@ static u8 bthci_GetAssocInfo(struct rtw_adapter *padapter, u8 EntryNum)
                        tempBuf, TotalLen-BaseMemoryShift);
 
                pAmpAsoc = (struct amp_assoc_structure *)tempBuf;
-               pAmpAsoc->Length = le16_to_cpu(pAmpAsoc->Length);
+               le16_to_cpus(&pAmpAsoc->Length);
                BaseMemoryShift += 3 + pAmpAsoc->Length;
 
                RTPRINT(FIOCTL, IOCTL_BT_HCICMD, ("TypeID = 0x%x, ", pAmpAsoc->TypeID));