* [PATCH] staging: wilc1000: Fix sparse warning in wilc_wfi_cfgoperations.c
@ 2017-03-20 6:17 Jacob Zachariah
2017-03-20 11:45 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Jacob Zachariah @ 2017-03-20 6:17 UTC (permalink / raw)
To: aditya.shankar, ganesh.krishna, gregkh, linux-wireless, devel,
linux-kernel
Cc: Jacob Zachariah
Fix the following warning reported by sparse:
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2006:51: warning: incorrect type in assignment (different base types)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2006:51: expected unsigned short [unsigned] [assigned] [usertype] ht_capa_info
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2006:51: got restricted __le16 const [usertype] cap_info
Signed-off-by: Jacob Zachariah <jacob.zac316@gmail.com>
---
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index a37896f..bacd366 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -2003,7 +2003,7 @@ static int add_station(struct wiphy *wiphy, struct net_device *dev,
strStaParams.ht_supported = false;
} else {
strStaParams.ht_supported = true;
- strStaParams.ht_capa_info = params->ht_capa->cap_info;
+ strStaParams.ht_capa_info = le16_to_cpu(params->ht_capa->cap_info);
strStaParams.ht_ampdu_params = params->ht_capa->ampdu_params_info;
memcpy(strStaParams.ht_supp_mcs_set,
¶ms->ht_capa->mcs,
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: wilc1000: Fix sparse warning in wilc_wfi_cfgoperations.c
2017-03-20 6:17 [PATCH] staging: wilc1000: Fix sparse warning in wilc_wfi_cfgoperations.c Jacob Zachariah
@ 2017-03-20 11:45 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2017-03-20 11:45 UTC (permalink / raw)
To: Jacob Zachariah
Cc: aditya.shankar, ganesh.krishna, gregkh, linux-wireless, devel,
linux-kernel
On Sun, Mar 19, 2017 at 11:17:08PM -0700, Jacob Zachariah wrote:
> Fix the following warning reported by sparse:
>
> drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2006:51: warning: incorrect type in assignment (different base types)
> drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2006:51: expected unsigned short [unsigned] [assigned] [usertype] ht_capa_info
> drivers/staging/wilc1000/wilc_wfi_cfgoperations.c:2006:51: got restricted __le16 const [usertype] cap_info
>
This is probably correct but there is another just a few lines down.
Fix that as well.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-20 11:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-20 6:17 [PATCH] staging: wilc1000: Fix sparse warning in wilc_wfi_cfgoperations.c Jacob Zachariah
2017-03-20 11:45 ` Dan Carpenter
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).