LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Johannes Postma <jgmpostma@gmail.com>
To: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org,
devel@driverdev.osuosl.org
Cc: Johannes Postma <jgmpostma@gmail.com>,
Larry Finger <Larry.Finger@lwfinger.net>,
Jes Sorensen <Jes.Sorensen@redhat.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [PATCH] staging: rtl8723au: Fix sparse warning: cast to restricted __le16
Date: Thu, 6 Aug 2015 12:21:52 +0100 [thread overview]
Message-ID: <1438860112-1786-1-git-send-email-jgmpostma@gmail.com> (raw)
usPtr is used as __le16 *, but was defined as u16 *.
This was reported by sparse as:
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:1850:29: warning: cast to
restricted __le16
This patch fixes the type of usPtr.
Signed-off-by: Johannes Postma <jgmpostma@gmail.com>
---
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
index cb5076a..eb76ac4 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
@@ -1838,7 +1838,7 @@ Hal_EfuseParseThermalMeter_8723A(struct rtw_adapter *padapter,
static void rtl8723a_cal_txdesc_chksum(struct tx_desc *ptxdesc)
{
- u16 *usPtr = (u16 *) ptxdesc;
+ __le16 *usPtr = (__le16 *)ptxdesc;
u32 count = 16; /* (32 bytes / 2 bytes per XOR) => 16 times */
u32 index;
u16 checksum = 0;
--
2.5.0
next reply other threads:[~2015-08-06 11:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-06 11:21 Johannes Postma [this message]
2015-08-06 12:21 ` Jes Sorensen
2015-08-07 8:37 ` Johannes Postma
2015-08-07 12:26 ` Jes Sorensen
2015-08-07 13:08 ` Johannes Postma
-- strict thread matches above, loose matches on Subject: below --
2015-03-11 17:21 [PATCH] staging: rtl8723au: Fix sparse warning " Marcus Folkesson
2015-03-11 18:23 ` Jes Sorensen
2014-11-18 1:45 [PATCH] staging:rtl8723au: " Tobenna P. Igwe
2014-11-18 1:59 ` Greg KH
2014-11-18 2:51 ` Tobenna Peter, Igwe
2014-11-18 4:06 ` Greg KH
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=1438860112-1786-1-git-send-email-jgmpostma@gmail.com \
--to=jgmpostma@gmail.com \
--cc=Jes.Sorensen@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--subject='Re: [PATCH] staging: rtl8723au: Fix sparse warning: cast to restricted __le16' \
/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
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).