From: Aviya Erenfeld <aviyae42@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>,
sergio.paracuellos@gmail.com, juliana.orod@gmail.com
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging: wlan-ng: Avoid bogus endianness
Date: Tue, 12 Sep 2017 01:51:10 +0300 [thread overview]
Message-ID: <83e35218-eb69-7f83-6fe1-faec8ec755ce@gmail.com> (raw)
The linkstatus variable in the info struct received as __le16
but handled in every other place in the driver as u16
Fix that and remove the sparse warning that occurred due to it:
prism2sta.c:1450:29: warning: incorrect type in assignment (different base types)
prism2sta.c:1450:29: expected unsigned short [unsigned] [usertype] link_status_new
prism2sta.c:1450:29: got restricted __le16 [usertype] linkstatus
Signed-off-by: Aviya Erenfeld <aviyae42@gmail.com>
---
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
next reply other threads:[~2017-09-11 22:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-11 22:51 Aviya Erenfeld [this message]
2017-09-12 8:22 ` [PATCH] staging: wlan-ng: Avoid bogus endianness Dan Carpenter
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=83e35218-eb69-7f83-6fe1-faec8ec755ce@gmail.com \
--to=aviyae42@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=juliana.orod@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sergio.paracuellos@gmail.com \
/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