From: Steve Pennington <sgpenn@gmail.com>
To: Larry Finger <Larry.Finger@lwfinger.net>,
Jes Sorensen <Jes.Sorensen@redhat.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Greg Donald <gdonald@gmail.com>, Joe Perches <joe@perches.com>,
Roberta Dobrescu <roberta.dobrescu@gmail.com>,
Masanari Iida <standby24x7@gmail.com>,
linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Cc: Steve Pennington <sgpenn@gmail.com>
Subject: [PATCH] staging: rtl8723au: fix incorrect type in assignment warning
Date: Wed, 22 Jul 2015 12:50:11 -0500 [thread overview]
Message-ID: <1437587411-31841-1-git-send-email-sgpenn@gmail.com> (raw)
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>
---
drivers/staging/rtl8723au/core/rtw_recv.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723au/core/rtw_recv.c b/drivers/staging/rtl8723au/core/rtw_recv.c
index 274a4b6..ad0549c 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);
}
--
2.4.6
next reply other threads:[~2015-07-22 17:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 17:50 Steve Pennington [this message]
2015-07-22 17:56 ` [PATCH] staging: rtl8723au: fix incorrect type in assignment warning Jes Sorensen
-- strict thread matches above, loose matches on Subject: below --
2015-07-21 17:31 Steve Pennington
2015-07-21 17:47 ` Jes Sorensen
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=1437587411-31841-1-git-send-email-sgpenn@gmail.com \
--to=sgpenn@gmail.com \
--cc=Jes.Sorensen@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=gdonald@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=roberta.dobrescu@gmail.com \
--cc=standby24x7@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;
as well as URLs for NNTP newsgroup(s).