lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1506639914-6335-1-git-send-email-matthew@giassa.net>
Date:   Thu, 28 Sep 2017 16:05:14 -0700
From:   Matthew Giassa <matthew@...ssa.net>
To:     gregkh@...uxfoundation.org
Cc:     sergio.paracuellos@...il.com, juliana.orod@...il.com,
        devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
        matthew@...ssa.net
Subject: [PATCH] staging: wlan-ng: resolve sparse Endianness issue.

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@...ssa.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ