Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1741844 > unrolled thread

[PATCH] staging: wlan-ng: resolve sparse Endianness issue.

Started byMatthew Giassa <matthew@giassa.net>
First post2017-09-29 01:10 +0200
Last post2017-09-29 14:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: wlan-ng: resolve sparse Endianness issue. Matthew Giassa <matthew@giassa.net> - 2017-09-29 01:10 +0200
    Re: [PATCH] staging: wlan-ng: resolve sparse Endianness issue. Dan Carpenter <dan.carpenter@oracle.com> - 2017-09-29 14:00 +0200

#1741844 — [PATCH] staging: wlan-ng: resolve sparse Endianness issue.

FromMatthew Giassa <matthew@giassa.net>
Date2017-09-29 01:10 +0200
Subject[PATCH] staging: wlan-ng: resolve sparse Endianness issue.
Message-ID<uuQ6m-6L4-5@gated-at.bofh.it>
Explicitly converting from __le16 to CPU u16 to resolve sparse error in
prism2sta.c. Original error:

drivers/staging//wlan-ng/prism2sta.c:1450:29: warning: incorrect type in
assignment (different base types)
drivers/staging//wlan-ng/prism2sta.c:1450:29:    expected unsigned short
[unsigned] [usertype] link_status_new
drivers/staging//wlan-ng/prism2sta.c:1450:29:    got restricted __le16
[usertype] linkstatus

Error no longer present.

Signed-off-by: Matthew Giassa <matthew@giassa.net>
---
 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

[toc] | [next] | [standalone]


#1742068

FromDan Carpenter <dan.carpenter@oracle.com>
Date2017-09-29 14:00 +0200
Message-ID<uv27w-5HZ-7@gated-at.bofh.it>
In reply to#1741844
Someone already sent this.  Work against linux-next or staging-next.

regards,
dan carpenter

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web