diff mbox

[OPW,kernel] staging:rtl8187se:ieee80211: Fix incorrect type in assignment

Message ID 20140304234740.GA12144@himangi-Inspiron-N5110gmail.com
State New, archived
Headers show

Commit Message

HIMANGI SARAOGI March 4, 2014, 11:47 p.m. UTC
This patch fixes sparse warnings like :
(1) drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:331:31:
warning:
incorrect type in assignment (different base types)
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:331:31:
expected unsigned short [unsigned] [usertype] frame_ctl
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:331:31:    got
restricted __le16 [usertype] <noident>

(2) drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:1091:32:
warning: incorrect type in assignment (different base types)
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:1091:32:
expected restricted __le16 [usertype] duration_id
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:1091:32:    got
int

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
---
v2: Change the header

 drivers/staging/rtl8187se/ieee80211/ieee80211.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul E. McKenney March 4, 2014, 11:56 p.m. UTC | #1
On Wed, Mar 05, 2014 at 05:17:40AM +0530, Himangi Saraogi wrote:
> This patch fixes sparse warnings like :
> (1) drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:331:31:
> warning:
> incorrect type in assignment (different base types)
> drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:331:31:
> expected unsigned short [unsigned] [usertype] frame_ctl
> drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:331:31:    got
> restricted __le16 [usertype] <noident>
> 
> (2) drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:1091:32:
> warning: incorrect type in assignment (different base types)
> drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:1091:32:
> expected restricted __le16 [usertype] duration_id
> drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:1091:32:    got
> int
> 
> Signed-off-by: Himangi Saraogi <himangi774@gmail.com>

Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

> ---
> v2: Change the header
> 
>  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 09ffd9b..711143c 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
> @@ -473,7 +473,7 @@ enum {
>  };
> 
>  struct ieee80211_header_data {
> -	u16 frame_ctl;
> +	__le16 frame_ctl;
>  	u16 duration_id;
>  	u8 addr1[6];
>  	u8 addr2[6];
> -- 
> 1.7.9.5
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
diff mbox

Patch

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index 09ffd9b..711143c 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -473,7 +473,7 @@  enum {
 };
 
 struct ieee80211_header_data {
-	u16 frame_ctl;
+	__le16 frame_ctl;
 	u16 duration_id;
 	u8 addr1[6];
 	u8 addr2[6];