Skip to contentSkip to conversation

staging: wlan-ng: resolve sparse endianness error.

PATCH In review Matthew Giassa 2 participants 3 messages Oct 25, 2017 – Nov 6, 2017 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: wlan-ng: resolve sparse endianness error.

Adding le16_to_cpu conversion in prism2sta.c, to resolve outstanding sparse errors as noted in the current TODO in staging-next. Original error:

CHECK drivers/staging//wlan-ng/prism2usb.c
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

Sparse error no longer present after change.

---
 drivers/staging/wlan-ng/prism2sta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/prism2sta.c +1 -1
index c9df450..070a237 100644
@@ -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);
 }
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 9 lines · Matthew Giassa

Adding le16_to_cpu conversion in prism2sta.c, to resolve outstanding sparse errors as noted in the current TODO in staging-next. Original error:

CHECK drivers/staging//wlan-ng/prism2usb.c
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

Quoted 6 lines

Sparse error no longer present after change.

---
 drivers/staging/wlan-ng/prism2sta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This does not apply to my tree at all :(

#2 lore raw
Quoted 10 lines · Greg KH
Quoted 9 lines · Matthew Giassa

Adding le16_to_cpu conversion in prism2sta.c, to resolve outstanding sparse errors as noted in the current TODO in staging-next. Original error:

CHECK drivers/staging//wlan-ng/prism2usb.c
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

Quoted 8 lines
Quoted 6 lines

Sparse error no longer present after change.

---
 drivers/staging/wlan-ng/prism2sta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This does not apply to my tree at all :(

Pardon. Duplicate of patch that had already been submitted, which Dan C. noted. Patch can be discarded.