From: Tobenna P. Igwe Date: Tue, 18 Nov 2014 01:45:41 +0000 (+0000) Subject: staging:rtl8723au: Fix sparse warning cast to restricted __le16 X-Git-Tag: firefly_0821_release~176^2~2665^2~217 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8488d6eca9d3bfd10420d37fccf45b98cdd867ac;p=firefly-linux-kernel-4.4.55.git staging:rtl8723au: Fix sparse warning cast to restricted __le16 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c index d80ea4ee39e9..78665eec3c1d 100644 --- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c @@ -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));