LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: Marcus Folkesson <marcus.folkesson@gmail.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-wireless@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723au: Fix sparse warning cast to restricted __le16
Date: Wed, 11 Mar 2015 14:23:29 -0400 [thread overview]
Message-ID: <wrfjsidb1jha.fsf@ultrasam.lan.trained-monkey.org> (raw)
In-Reply-To: <1426094490-17065-1-git-send-email-marcus.folkesson@gmail.com> (Marcus Folkesson's message of "Wed, 11 Mar 2015 18:21:30 +0100")
Marcus Folkesson <marcus.folkesson@gmail.com> writes:
> This patch fixes the following sparse warnings:
>
> CHECK drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
> drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:265:37: warning:
> cast to restricted __le16
> drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:267:39: warning:
> cast to restricted __le16
>
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
> ---
> drivers/staging/rtl8723au/include/rtl8723a_hal.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/rtl8723au/include/rtl8723a_hal.h b/drivers/staging/rtl8723au/include/rtl8723a_hal.h
> index e146336..f642b11 100644
> --- a/drivers/staging/rtl8723au/include/rtl8723a_hal.h
> +++ b/drivers/staging/rtl8723au/include/rtl8723a_hal.h
> @@ -255,10 +255,10 @@ struct hal_data_8723a {
> struct hal_version VersionID;
> enum rt_customer_id CustomerID;
>
> - u16 FirmwareVersion;
> - u16 FirmwareVersionRev;
> - u16 FirmwareSubVersion;
> - u16 FirmwareSignature;
> + __le16 FirmwareVersion;
> + __le16 FirmwareVersionRev;
> + __le16 FirmwareSubVersion;
> + __le16 FirmwareSignature;
Ehm I am pretty sure it doesn't:
rtl8723au_hal_init.c:265
pHalData->FirmwareVersion = le16_to_cpu(pFwHdr->Version);
pHalData->FirmwareSubVersion = pFwHdr->Subversion;
pHalData->FirmwareSignature = le16_to_cpu(pFwHdr->Signature);
If anything, the second assignment there should be changed to use
le16_to_cpu(), but your conversion is definitely wrong.
NACK
Jes
next prev parent reply other threads:[~2015-03-11 18:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 17:21 Marcus Folkesson
2015-03-11 18:23 ` Jes Sorensen [this message]
-- strict thread matches above, loose matches on Subject: below --
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
2014-11-18 1:45 [PATCH] staging:rtl8723au: Fix sparse warning " 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=wrfjsidb1jha.fsf@ultrasam.lan.trained-monkey.org \
--to=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 \
--cc=marcus.folkesson@gmail.com \
--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).