The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Matthew Giassa <matthew@giassa.net>
To: gregkh@linuxfoundation.org
Cc: sergio.paracuellos@gmail.com, juliana.orod@gmail.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	matthew@giassa.net
Subject: [PATCH] staging: wlan-ng: resolve sparse Endianness issue.
Date: Thu, 28 Sep 2017 16:05:14 -0700	[thread overview]
Message-ID: <1506639914-6335-1-git-send-email-matthew@giassa.net> (raw)

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

             reply	other threads:[~2017-09-28 23:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 23:05 Matthew Giassa [this message]
2017-09-29 11:50 ` [PATCH] staging: wlan-ng: resolve sparse Endianness issue 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=1506639914-6335-1-git-send-email-matthew@giassa.net \
    --to=matthew@giassa.net \
    --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