Commit 8fc8cf44 authored by Johannes Postma's avatar Johannes Postma Committed by Greg Kroah-Hartman
Browse files

staging: rtl8723au: Fix sparse warning: cast to restricted __le16



usPtr is used as __le16 *, but was defined as u16 *.
This was reported by sparse as:
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:1850:29: warning: cast to
restricted __le16

This patch fixes the type of usPtr.

Signed-off-by: default avatarJohannes Postma <jgmpostma@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3a6779f5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1838,7 +1838,7 @@ Hal_EfuseParseThermalMeter_8723A(struct rtw_adapter *padapter,

static void rtl8723a_cal_txdesc_chksum(struct tx_desc *ptxdesc)
{
	u16 *usPtr = (u16 *) ptxdesc;
	__le16 *usPtr = (__le16 *)ptxdesc;
	u32 count = 16;		/*  (32 bytes / 2 bytes per XOR) => 16 times */
	u32 index;
	u16 checksum = 0;