* [PATCH] staging: wlan-ng: Avoid bogus endianness
@ 2017-09-11 22:51 Aviya Erenfeld
2017-09-12 8:22 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Aviya Erenfeld @ 2017-09-11 22:51 UTC (permalink / raw)
To: Greg KH, sergio.paracuellos, juliana.orod; +Cc: devel, linux-kernel
The linkstatus variable in the info struct received as __le16
but handled in every other place in the driver as u16
Fix that and remove the sparse warning that occurred due to it:
prism2sta.c:1450:29: warning: incorrect type in assignment (different base types)
prism2sta.c:1450:29: expected unsigned short [unsigned] [usertype] link_status_new
prism2sta.c:1450:29: got restricted __le16 [usertype] linkstatus
Signed-off-by: Aviya Erenfeld <aviyae42@gmail.com>
---
drivers/staging/wlan-ng/prism2sta.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
index c9df450..070a237 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -1447,7 +1447,7 @@ static void prism2sta_inf_linkstatus(struct wlandevice *wlandev,
{
struct hfa384x *hw = wlandev->priv;
- hw->link_status_new = inf->info.linkstatus.linkstatus;
+ hw->link_status_new = le16_to_cpu(inf->info.linkstatus.linkstatus);
schedule_work(&hw->link_bh);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: wlan-ng: Avoid bogus endianness
2017-09-11 22:51 [PATCH] staging: wlan-ng: Avoid bogus endianness Aviya Erenfeld
@ 2017-09-12 8:22 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2017-09-12 8:22 UTC (permalink / raw)
To: Aviya Erenfeld
Cc: Greg KH, sergio.paracuellos, juliana.orod, devel, linux-kernel
Seems correct.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-12 8:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-11 22:51 [PATCH] staging: wlan-ng: Avoid bogus endianness Aviya Erenfeld
2017-09-12 8:22 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox