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


Groups > linux.kernel > #1673178 > unrolled thread

[PATCH] staging: wlan-ng: Fix sparse warning: incorrect type in assignment This patch fixes the following sparse warning

Started byAbdAllah-MEZITI <abdallah.meziti.pro@gmail.com>
First post2017-06-23 04:30 +0200
Last post2017-06-25 16:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] staging: wlan-ng: Fix sparse warning: incorrect type in assignment This patch fixes the following sparse warning AbdAllah-MEZITI <abdallah.meziti.pro@gmail.com> - 2017-06-23 04:30 +0200
    Re: [PATCH] staging: wlan-ng: Fix sparse warning: incorrect type in  assignment This patch fixes the following sparse warning Greg KH <gregkh@linuxfoundation.org> - 2017-06-25 16:40 +0200

#1673178 — [PATCH] staging: wlan-ng: Fix sparse warning: incorrect type in assignment This patch fixes the following sparse warning

FromAbdAllah-MEZITI <abdallah.meziti.pro@gmail.com>
Date2017-06-23 04:30 +0200
Subject[PATCH] staging: wlan-ng: Fix sparse warning: incorrect type in assignment This patch fixes the following sparse warning
Message-ID<tVmw9-4E2-3@gated-at.bofh.it>
drivers/staging/wlan-ng/prism2mgmt.c:188:25: warning: incorrect type in assignment (different base types)
drivers/staging/wlan-ng/prism2mgmt.c:188:25:    expected unsigned short [unsigned] [addressable] [usertype] tx_rate
drivers/staging/wlan-ng/prism2mgmt.c:188:25:    got restricted __le16 [usertype] <noident>
drivers/staging/wlan-ng/prism2mgmt.c:200:30: warning: incorrect type in assignment (different base types)
drivers/staging/wlan-ng/prism2mgmt.c:200:30:    expected unsigned short [unsigned] [addressable] [usertype] channel_list
drivers/staging/wlan-ng/prism2mgmt.c:200:30:    got restricted __le16 [usertype] <noident>
drivers/staging/wlan-ng/prism2mgmt.c:203:26: warning: incorrect type in assignment (different base types)
drivers/staging/wlan-ng/prism2mgmt.c:203:26:    expected unsigned short [unsigned] [addressable] [usertype] len
drivers/staging/wlan-ng/prism2mgmt.c:203:26:    got restricted __le16 [usertype] <noident>
drivers/staging/wlan-ng/prism2mgmt.c:232:28: warning: incorrect type in assignment (different base types)
drivers/staging/wlan-ng/prism2mgmt.c:232:28:    expected unsigned short [unsigned] [short] <noident>
drivers/staging/wlan-ng/prism2mgmt.c:232:28:    got restricted __le16 [usertype] <noident>

Signed-off-by: AbdAllah-MEZITI <abdallah.meziti.pro@gmail.com>
---
 drivers/staging/wlan-ng/hfa384x.h    | 6 +++---
 drivers/staging/wlan-ng/prism2mgmt.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h
index 60110b4..1dc6ed8 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -358,7 +358,7 @@ struct hfa384x_bytestr {
 } __packed;
 
 struct hfa384x_bytestr32 {
-	u16 len;
+	__le16 len;
 	u8 data[32];
 } __packed;
 
@@ -399,8 +399,8 @@ struct hfa384x_caplevel {
 
 /*-- Configuration Record: HostScanRequest (data portion only) --*/
 struct hfa384x_host_scan_request_data {
-	u16 channel_list;
-	u16 tx_rate;
+	__le16 channel_list;
+	__le16 tx_rate;
 	struct hfa384x_bytestr32 ssid;
 } __packed;
 
diff --git a/drivers/staging/wlan-ng/prism2mgmt.c b/drivers/staging/wlan-ng/prism2mgmt.c
index f4d6e48..c4aa9e7 100644
--- a/drivers/staging/wlan-ng/prism2mgmt.c
+++ b/drivers/staging/wlan-ng/prism2mgmt.c
@@ -213,7 +213,7 @@ int prism2mgmt_scan(struct wlandevice *wlandev, void *msgp)
 		goto exit;
 	}
 	if (word == HFA384x_PORTSTATUS_DISABLED) {
-		u16 wordbuf[17];
+		__le16 wordbuf[17];
 
 		result = hfa384x_drvr_setconfig16(hw,
 					HFA384x_RID_CNFROAMINGMODE,
-- 
2.7.4

[toc] | [next] | [standalone]


#1674227 — Re: [PATCH] staging: wlan-ng: Fix sparse warning: incorrect type in assignment This patch fixes the following sparse warning

FromGreg KH <gregkh@linuxfoundation.org>
Date2017-06-25 16:40 +0200
SubjectRe: [PATCH] staging: wlan-ng: Fix sparse warning: incorrect type in assignment This patch fixes the following sparse warning
Message-ID<tWgRH-6e4-7@gated-at.bofh.it>
In reply to#1673178
On Fri, Jun 23, 2017 at 04:21:54AM +0200, AbdAllah-MEZITI wrote:
> drivers/staging/wlan-ng/prism2mgmt.c:188:25: warning: incorrect type in assignment (different base types)
> drivers/staging/wlan-ng/prism2mgmt.c:188:25:    expected unsigned short [unsigned] [addressable] [usertype] tx_rate
> drivers/staging/wlan-ng/prism2mgmt.c:188:25:    got restricted __le16 [usertype] <noident>
> drivers/staging/wlan-ng/prism2mgmt.c:200:30: warning: incorrect type in assignment (different base types)
> drivers/staging/wlan-ng/prism2mgmt.c:200:30:    expected unsigned short [unsigned] [addressable] [usertype] channel_list
> drivers/staging/wlan-ng/prism2mgmt.c:200:30:    got restricted __le16 [usertype] <noident>
> drivers/staging/wlan-ng/prism2mgmt.c:203:26: warning: incorrect type in assignment (different base types)
> drivers/staging/wlan-ng/prism2mgmt.c:203:26:    expected unsigned short [unsigned] [addressable] [usertype] len
> drivers/staging/wlan-ng/prism2mgmt.c:203:26:    got restricted __le16 [usertype] <noident>
> drivers/staging/wlan-ng/prism2mgmt.c:232:28: warning: incorrect type in assignment (different base types)
> drivers/staging/wlan-ng/prism2mgmt.c:232:28:    expected unsigned short [unsigned] [short] <noident>
> drivers/staging/wlan-ng/prism2mgmt.c:232:28:    got restricted __le16 [usertype] <noident>
> 
> Signed-off-by: AbdAllah-MEZITI <abdallah.meziti.pro@gmail.com>
> ---
>  drivers/staging/wlan-ng/hfa384x.h    | 6 +++---
>  drivers/staging/wlan-ng/prism2mgmt.c | 2 +-
>  2 files changed, 4 insertions(+), 4 deletions(-)

Does not apply to my staging-next branch at all :(

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web