diff mbox

[OPW,kernel,05/14] Staging: rtl8192e: Fix incorrect type in assignment in rtl819x_BAProc.c

Message ID 5515644ffe9a381090fcdd31c2f9ab7f5df0d3d4.1383565836.git.rashika.kheria@gmail.com
State New, archived
Headers show

Commit Message

Rashika Nov. 4, 2013, 12:14 p.m. UTC
This patch fixes the following Sparse warnings in
rtl8192e/rtl819x_BAProc.c-

drivers/staging/rtl8192e/rtl819x_BAProc.c:118:21: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl819x_BAProc.c:118:21:    expected   unsigned short [unsigned] [usertype] tmp
drivers/staging/rtl8192e/rtl819x_BAProc.c:118:21:    got restricted __le16 [usertype] <noident>

drivers/staging/rtl8192e/rtl819x_BAProc.c:122:13: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl819x_BAProc.c:122:13:    expected unsigned short [unsigned] [addressable] [usertype] tmp
drivers/staging/rtl8192e/rtl819x_BAProc.c:122:13:    got restricted __le16 [usertype] <noident>

drivers/staging/rtl8192e/rtl819x_BAProc.c:125:13: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl819x_BAProc.c:125:13:    expected unsigned short [unsigned] [addressable] [usertype] tmp
drivers/staging/rtl8192e/rtl819x_BAProc.c:125:13:    got restricted __le16 [usertype] <noident>

drivers/staging/rtl8192e/rtl819x_BAProc.c:181:13: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl819x_BAProc.c:181:13:    expected unsigned short [unsigned] [usertype] tmp
drivers/staging/rtl8192e/rtl819x_BAProc.c:181:13:    got restricted __le16 [usertype] <noident>

drivers/staging/rtl8192e/rtl819x_BAProc.c:184:13: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl819x_BAProc.c:184:13:    expected unsigned short [unsigned] [addressable] [usertype] tmp
drivers/staging/rtl8192e/rtl819x_BAProc.c:184:13:    got restricted __le16 [usertype] <noident>

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
---
 drivers/staging/rtl8192e/rtl819x_BAProc.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c
index 32fbbc9..adc6cc7 100644
--- a/drivers/staging/rtl8192e/rtl819x_BAProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c
@@ -115,14 +115,14 @@  static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *Dst,
 
 	if (ACT_ADDBARSP == type) {
 		RT_TRACE(COMP_DBG, "====>to send ADDBARSP\n");
-		tmp = cpu_to_le16(StatusCode);
+		tmp = StatusCode;
 		memcpy(tag, (u8 *)&tmp, 2);
 		tag += 2;
 	}
-	tmp = cpu_to_le16(pBA->BaParamSet.shortData);
+	tmp = pBA->BaParamSet.shortData;
 	memcpy(tag, (u8 *)&tmp, 2);
 	tag += 2;
-	tmp = cpu_to_le16(pBA->BaTimeoutValue);
+	tmp = pBA->BaTimeoutValue;
 	memcpy(tag, (u8 *)&tmp, 2);
 	tag += 2;
 
@@ -178,10 +178,10 @@  static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst,
 	*tag ++= ACT_CAT_BA;
 	*tag ++= ACT_DELBA;
 
-	tmp = cpu_to_le16(DelbaParamSet.shortData);
+	tmp = DelbaParamSet.shortData;
 	memcpy(tag, (u8 *)&tmp, 2);
 	tag += 2;
-	tmp = cpu_to_le16(ReasonCode);
+	tmp = ReasonCode;
 	memcpy(tag, (u8 *)&tmp, 2);
 	tag += 2;