LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Tobenna P. Igwe" <ptigwe@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: devel@driverdev.osuosl.org, linux-wireless@vger.kernel.org,
	gregkh@linuxfoundation.org, Larry.Finger@lwfinger.net,
	Jes.Sorensen@redhat.com
Subject: [PATCH] staging:rtl8723au: Fix sparse warning cast to restricted __le16
Date: Tue, 18 Nov 2014 01:45:41 +0000	[thread overview]
Message-ID: <20141118014529.GA937@Tobenna-Peter-Igwes-MacBook-Pro.local> (raw)

This patch fixes the following sparse warning:

drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c:343:36: warning:
cast to restricted __le16

by using the le16_to_cpus function.

Signed-off-by: Tobenna P. Igwe <ptigwe@gmail.com>
---
 drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
index d80ea4e..78665ee 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
@@ -340,7 +340,7 @@ static u8 bthci_GetAssocInfo(struct rtw_adapter *padapter, u8 EntryNum)
 			tempBuf, TotalLen-BaseMemoryShift);
 
 		pAmpAsoc = (struct amp_assoc_structure *)tempBuf;
-		pAmpAsoc->Length = le16_to_cpu(pAmpAsoc->Length);
+		le16_to_cpus(&pAmpAsoc->Length);
 		BaseMemoryShift += 3 + pAmpAsoc->Length;
 
 		RTPRINT(FIOCTL, IOCTL_BT_HCICMD, ("TypeID = 0x%x, ", pAmpAsoc->TypeID));
-- 
1.7.10.4


             reply	other threads:[~2014-11-18  1:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-18  1:45 Tobenna P. Igwe [this message]
2014-11-18  1:59 ` Greg KH
2014-11-18  2:51   ` Tobenna Peter, Igwe
2014-11-18  4:06     ` Greg KH
2015-03-11 17:21 [PATCH] staging: rtl8723au: " Marcus Folkesson
2015-03-11 18:23 ` Jes Sorensen
2015-08-06 11:21 [PATCH] staging: rtl8723au: Fix sparse warning: " Johannes Postma
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

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=20141118014529.GA937@Tobenna-Peter-Igwes-MacBook-Pro.local \
    --to=ptigwe@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).