diff mbox

[OPW,kernel] staging:rtl8187se:ieee80211: Fix sparse warning of cast to restricted __le16

Message ID 20140312183716.GA13919@himangi-Inspiron-N5110gmail.com
State New, archived
Headers show

Commit Message

HIMANGI SARAOGI March 12, 2014, 6:37 p.m. UTC
This patch fixes the following sparse warnings:
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c:496:17: warning: cast to restricted __le16
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c:540:12: warning: cast to restricted __le16
drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c:586:12: warning: cast to restricted __le16

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
---
 drivers/staging/rtl8187se/ieee80211/ieee80211.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bob Copeland March 12, 2014, 6:56 p.m. UTC | #1
On Thu, Mar 13, 2014 at 12:07:16AM +0530, Himangi Saraogi wrote:
> drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c:496:17: warning: cast to restricted __le16

>  
>  struct ieee80211_hdr_4addr {
> -	u16 frame_ctl;
> +	__le16 frame_ctl;
>  	u16 duration_id;
>  	u8 addr1[ETH_ALEN];
>  	u8 addr2[ETH_ALEN];

Great!

Reviewed-by: Bob Copeland <me@bobcopeland.com>
Waskiewicz Jr, Peter P March 14, 2014, 12:28 a.m. UTC | #2
On Thu, 2014-03-13 at 00:07 +0530, Himangi Saraogi wrote:
> This patch fixes the following sparse warnings:
> drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c:496:17: warning: cast to restricted __le16
> drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c:540:12: warning: cast to restricted __le16
> drivers/staging/rtl8187se/ieee80211/ieee80211_crypt_tkip.c:586:12: warning: cast to restricted __le16
> 
> Signed-off-by: Himangi Saraogi <himangi774@gmail.com>

Applied, thanks.

> ---
>  drivers/staging/rtl8187se/ieee80211/ieee80211.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
> index e4c1c37..d1763b7 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
> @@ -482,7 +482,7 @@ struct ieee80211_header_data {
>  };
>  
>  struct ieee80211_hdr_4addr {
> -	u16 frame_ctl;
> +	__le16 frame_ctl;
>  	u16 duration_id;
>  	u8 addr1[ETH_ALEN];
>  	u8 addr2[ETH_ALEN];
> -- 
> 1.7.9.5
>
diff mbox

Patch

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index e4c1c37..d1763b7 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -482,7 +482,7 @@  struct ieee80211_header_data {
 };
 
 struct ieee80211_hdr_4addr {
-	u16 frame_ctl;
+	__le16 frame_ctl;
 	u16 duration_id;
 	u8 addr1[ETH_ALEN];
 	u8 addr2[ETH_ALEN];