From: AbdAllah-MEZITI <abdallah.meziti.pro@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Sergio Paracuellos <sergio.paracuellos@gmail.com>,
Juliana Rodrigues <juliana.orod@gmail.com>,
Andrea della Porta <sfaragnaus@gmail.com>,
Frans Klaver <fransklaver@gmail.com>,
Shiva Kerdel <shiva@exdev.nl>,
sayli karnik <karniksayli1995@gmail.com>,
Rehas Sachdeva <aquannie@gmail.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: wlan-ng: Fix sparse warning: incorrect type in assignment This patch fixes the following sparse warning
Date: Fri, 23 Jun 2017 04:21:54 +0200 [thread overview]
Message-ID: <1498184531-7351-1-git-send-email-abdallah.meziti.pro@gmail.com> (raw)
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
next reply other threads:[~2017-06-23 2:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-23 2:21 AbdAllah-MEZITI [this message]
2017-06-25 14:39 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1498184531-7351-1-git-send-email-abdallah.meziti.pro@gmail.com \
--to=abdallah.meziti.pro@gmail.com \
--cc=aquannie@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=fransklaver@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=juliana.orod@gmail.com \
--cc=karniksayli1995@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sergio.paracuellos@gmail.com \
--cc=sfaragnaus@gmail.com \
--cc=shiva@exdev.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®