From: maomao xu <albert008.xu@gmail.com>
To: gregkh@linuxfoundation.org, singhalsimran0@gmail.com,
colin@cvidal.org, albert008.xu@gmail.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: rtl8192u: Fix sparse warnings about endianness
Date: Wed, 15 Feb 2017 14:57:00 +0800 [thread overview]
Message-ID: <1487141820-5389-1-git-send-email-albert008.xu@gmail.com> (raw)
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
reply other threads:[~2017-02-15 6:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1487141820-5389-1-git-send-email-albert008.xu@gmail.com \
--to=albert008.xu@gmail.com \
--cc=colin@cvidal.org \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=singhalsimran0@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®