mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8192u: Fix sparse warnings about endianness
@ 2017-02-15  6:57 maomao xu
  0 siblings, 0 replies; only message in thread
From: maomao xu @ 2017-02-15  6:57 UTC (permalink / raw)
  To: gregkh, singhalsimran0, colin, albert008.xu, devel, linux-kernel

drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:175:36: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:175:36:    expected unsigned short [unsigned] [short] [usertype] <noident>
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:175:36:    got restricted __be16 [usertype] <noident>

Signed-off-by: maomao xu <albert008.xu@gmail.com>

diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
index 949c496..a1da90a 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
@@ -172,7 +172,7 @@ static inline int ieee80211_put_snap(u8 *data, u16 h_proto)
 	snap->oui[1] = oui[1];
 	snap->oui[2] = oui[2];
 
-	*(u16 *)(data + SNAP_SIZE) = htons(h_proto);
+	put_unaligned_be16(h_proto, data + SNAP_SIZE);
 
 	return SNAP_SIZE + sizeof(u16);
 }
-- 
1.7.9.5

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-15  6:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-15  6:57 [PATCH] staging: rtl8192u: Fix sparse warnings about endianness maomao xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®