Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1591105

[PATCH 6/6] staging: rtl8192u: Fix Sparse warning of cast to restricted __le16

From simran singhal <singhalsimran0@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 6/6] staging: rtl8192u: Fix Sparse warning of cast to restricted __le16
Date 2017-03-02 15:00 +0100
Message-ID <tgzqW-2ZE-35@gated-at.bofh.it> (permalink)
References <tgvGG-sV-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


This patch fixes the following Sparse warnings:-

drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c:177:16: warning: cast to restricted __le16

Signed-off-by: simran singhal <singhalsimran0@gmail.com>
---
 drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
index 4d6c928..713f1d6 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_crypt_tkip.c
@@ -174,7 +174,7 @@ static inline u16 Mk16(u8 hi, u8 lo)
 
 static inline u16 Mk16_le(u16 *v)
 {
-	return le16_to_cpu(*v);
+	return *v;
 }
 
 
-- 
2.7.4

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 6/6] staging: rtl8192u: Fix Sparse warning of cast to restricted __le16 simran singhal <singhalsimran0@gmail.com> - 2017-03-02 15:00 +0100

csiph-web