summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8723au
diff options
context:
space:
mode:
authorSteve Pennington <sgpenn@gmail.com>2015-07-22 20:50:11 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-07-23 07:14:08 +0300
commit80a60777d7e60e59e4deb756dc0e3989fe520f84 (patch)
tree7aedca5a89a2b3f6fa06b8aee015574e2ab8ebf7 /drivers/staging/rtl8723au
parent56fa2ece881348d314800b858581f2ae950f8e20 (diff)
downloadlinux-80a60777d7e60e59e4deb756dc0e3989fe520f84.tar.xz
staging: rtl8723au: fix incorrect type in assignment warning
Repaced calls to htons and memcpy with a single call to put_unaligned_be16 to fix the following sparse warning: drivers/staging/rtl8723au/core/rtw_recv.c:1557:21: warning: incorrect type in assignment (different base types) drivers/staging/rtl8723au/core/rtw_recv.c:1557:21: expected unsigned short [unsigned] [assigned] [usertype] len drivers/staging/rtl8723au/core/rtw_recv.c:1557:21: got restricted __be16 [usertype] <noident> Signed-off-by: Steve Pennington <sgpenn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723au')
-rw-r--r--drivers/staging/rtl8723au/core/rtw_recv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/rtl8723au/core/rtw_recv.c b/drivers/staging/rtl8723au/core/rtw_recv.c
index 274a4b65c022..ad0549c66529 100644
--- a/drivers/staging/rtl8723au/core/rtw_recv.c
+++ b/drivers/staging/rtl8723au/core/rtw_recv.c
@@ -1554,8 +1554,7 @@ static int wlanhdr_to_ethhdr (struct recv_frame *precvframe)
ether_addr_copy(ptr + ETH_ALEN, pattrib->src);
if (!bsnaphdr) {
- len = htons(len);
- memcpy(ptr + 12, &len, 2);
+ put_unaligned_be16(len, ptr + 12);
}