From: Perry Hooker <perry.hooker@gmail.com>
To: Larry.Finger@lwfinger.net
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org,
Perry Hooker <perry.hooker@gmail.com>
Subject: [PATCH] staging: r8712u: use __le32 type for little-endian data
Date: Fri, 10 Feb 2017 11:23:45 -0700 [thread overview]
Message-ID: <1486751025-17806-1-git-send-email-perry.hooker@gmail.com> (raw)
In-Reply-To: <1de09539-fc74-5caa-4b57-8384dff5060a@lwfinger.net>
This patch fixes the following sparse warning:
drivers/staging/rtl8712/usb_ops_linux.c:212:33: warning: cast to restricted __le32
Signed-off-by: Perry Hooker <perry.hooker@gmail.com>
---
drivers/staging/rtl8712/usb_ops_linux.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8712/usb_ops_linux.c b/drivers/staging/rtl8712/usb_ops_linux.c
index fc6bb0b..df7c1aa 100644
--- a/drivers/staging/rtl8712/usb_ops_linux.c
+++ b/drivers/staging/rtl8712/usb_ops_linux.c
@@ -192,7 +192,8 @@ void r8712_usb_write_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
static void r8712_usb_read_port_complete(struct urb *purb)
{
- uint isevt, *pbuf;
+ __le32 *pbuf;
+ uint isevt;
struct recv_buf *precvbuf = (struct recv_buf *)purb->context;
struct _adapter *padapter = (struct _adapter *)precvbuf->adapter;
struct recv_priv *precvpriv = &padapter->recvpriv;
@@ -208,7 +209,7 @@ static void r8712_usb_read_port_complete(struct urb *purb)
_pkt *pskb = precvbuf->pskb;
precvbuf->transfer_len = purb->actual_length;
- pbuf = (uint *)precvbuf->pbuf;
+ pbuf = (__le32 *)precvbuf->pbuf;
isevt = le32_to_cpu(*(pbuf + 1)) & 0x1ff;
if ((isevt & 0x1ff) == 0x1ff) {
r8712_rxcmd_event_hdl(padapter, pbuf);
--
2.4.11
next prev parent reply other threads:[~2017-02-10 19:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-10 3:51 [PATCH] staging: r8712u: remove unnecessary le32_to_cpu Perry Hooker
2017-02-10 14:08 ` Greg KH
2017-02-10 14:52 ` Larry Finger
2017-02-10 14:58 ` Greg KH
2017-02-10 15:07 ` Larry Finger
2017-02-10 18:24 ` Perry Hooker
2017-02-10 18:23 ` Perry Hooker [this message]
2017-02-10 20:55 ` [PATCH] staging: r8712u: use __le32 type for little-endian data Larry Finger
2017-02-11 19:04 ` Perry Hooker
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=1486751025-17806-1-git-send-email-perry.hooker@gmail.com \
--to=perry.hooker@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/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