[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1443832594-29663-1-git-send-email-jtk54@cornell.edu>
Date: Fri, 2 Oct 2015 20:36:28 -0400
From: Jacob Kiefer <jtk54@...nell.edu>
To: unlisted-recipients:; (no To-header on input)
Cc: Jacob Kiefer <jtk54@...nell.edu>,
Larry Finger <Larry.Finger@...inger.net>,
Jes Sorensen <Jes.Sorensen@...hat.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Gujulan Elango, Hari Prasath (H.)" <hgujulan@...teon.com>,
Roberta Dobrescu <roberta.dobrescu@...il.com>,
linux-wireless@...r.kernel.org (open list:STAGING - REALTEK RTL8723U
WIRELESS DRIVER),
devel@...verdev.osuosl.org (open list:STAGING SUBSYSTEM),
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] staging: rtl8723au: Fix Sparse errors in rtl8723a_cmd.c
From: Jacob Kiefer <jtk54@...nell.edu>
This patch fixes the following sparse errors:
CHECK drivers/staging/rtl8723au/hal/rtl8723a_cmd.c
...
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:118:25: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:118:25: expected unsigned int [unsigned] [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:118:25: got restricted __le32 [usertype] <noident>
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:130:14: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:130:14: expected unsigned int [unsigned] [usertype] mask
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:130:14: got restricted __le32 [usertype] <noident>
CC [M] drivers/staging/rtl8723au/hal/rtl8723a_cmd.o
Signed-off-by: Jacob Kiefer <jtk54@...nell.edu>
---
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c
index 9733aa6..111a24d 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c
@@ -115,9 +115,11 @@ exit:
int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u8 *param)
{
- *((u32 *)param) = cpu_to_le32(*((u32 *)param));
+ __le32 leparam;
- FillH2CCmd(padapter, RSSI_SETTING_EID, 3, param);
+ leparam = cpu_to_le32(*((u32 *)param));
+
+ FillH2CCmd(padapter, RSSI_SETTING_EID, 3, (u8 *)&leparam);
return _SUCCESS;
}
@@ -125,10 +127,11 @@ int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u8 *param)
int rtl8723a_set_raid_cmd(struct rtw_adapter *padapter, u32 mask, u8 arg)
{
u8 buf[5];
+ __le32 lemask;
memset(buf, 0, 5);
- mask = cpu_to_le32(mask);
- memcpy(buf, &mask, 4);
+ lemask = cpu_to_le32(mask);
+ memcpy(buf, (u32 *)&lemask, 4);
buf[4] = arg;
FillH2CCmd(padapter, MACID_CONFIG_EID, 5, buf);
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists