LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Tobenna Peter, Igwe" <ptigwe@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
Jes.Sorensen@redhat.com, linux-wireless@vger.kernel.org,
Larry.Finger@lwfinger.net
Subject: Re: [PATCH] staging:rtl8723au: Fix sparse warning cast to restricted __le16
Date: Tue, 18 Nov 2014 02:51:45 +0000 [thread overview]
Message-ID: <20141118025144.GA1041@Tobenna-Peter-Igwes-MacBook-Pro.local> (raw)
In-Reply-To: <20141118015947.GA21650@kroah.com>
On Mon, Nov 17, 2014 at 05:59:47PM -0800, Greg KH wrote:
> On Tue, Nov 18, 2014 at 01:45:41AM +0000, Tobenna P. Igwe wrote:
> > 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);
>
> This doesn't change the logic, and you should still have the same
> warning. How about fixing up Length to be the proper endian type?
>
> thanks,
>
> greg k-h
I've checked and sparse doesn't return the warning anymore. Also, I
backtracked through the file and Length seems to be set to its
correct endian type. The reason for the conversion is tempBuf being
an array of 'u8'.
Kind Regards,
Tobenna P. Igwe
next prev parent reply other threads:[~2014-11-18 2:51 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 1:45 Tobenna P. Igwe
2014-11-18 1:59 ` Greg KH
2014-11-18 2:51 ` Tobenna Peter, Igwe [this message]
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=20141118025144.GA1041@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).