From: maomao xu <albert008.xu@gmail.com>
To: gregkh@linuxfoundation.org, bhumirks@gmail.com,
singhalsimran0@gmail.com, nikolas@gnu.org,
bhaktipriya96@gmail.com, elise.lennion@gmail.com,
albert008.xu@gmail.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] staging: rtl8192u: Fix warnings about endianness
Date: Wed, 15 Feb 2017 17:06:27 +0800 [thread overview]
Message-ID: <1487149587-10365-1-git-send-email-albert008.xu@gmail.com> (raw)
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:564:37: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:564:37: expected unsigned short [unsigned] [usertype] len
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:564:37: got restricted __be16 [usertype] <noident>
Signed-off-by: maomao xu <albert008.xu@gmail.com>
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
index d1057b1..1e81c24 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
@@ -559,10 +559,8 @@ void ieee80211_indicate_packets(struct ieee80211_device *ieee, struct ieee80211_
memcpy(skb_push(sub_skb, ETH_ALEN), prxb->src, ETH_ALEN);
memcpy(skb_push(sub_skb, ETH_ALEN), prxb->dst, ETH_ALEN);
} else {
- u16 len;
/* Leave Ethernet header part of hdr and full payload */
- len = htons(sub_skb->len);
- memcpy(skb_push(sub_skb, 2), &len, 2);
+ put_unaligned_be16(sub_skb->len, kb_push(sub_skb, 2));
memcpy(skb_push(sub_skb, ETH_ALEN), prxb->src, ETH_ALEN);
memcpy(skb_push(sub_skb, ETH_ALEN), prxb->dst, ETH_ALEN);
}
--
1.7.9.5
next reply other threads:[~2017-02-15 9:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-15 9:06 maomao xu [this message]
2017-02-15 9:44 ` kbuild test robot
2017-02-16 18:43 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2017-02-15 10:21 maomao xu
2017-02-15 7:54 maomao xu
2017-02-15 8:33 ` Arnd Bergmann
2017-02-15 20:31 ` Dan Carpenter
2017-02-18 3:55 ` maomao
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=1487149587-10365-1-git-send-email-albert008.xu@gmail.com \
--to=albert008.xu@gmail.com \
--cc=bhaktipriya96@gmail.com \
--cc=bhumirks@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=elise.lennion@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nikolas@gnu.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
Powered by JetHome