mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Giassa <matthew@giassa.net>
To: gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, Matthew Giassa <matthew@giassa.net>
Subject: [PATCH] staging: wlan-ng: resolve sparse endianness error.
Date: Tue, 24 Oct 2017 23:06:18 -0700	[thread overview]
Message-ID: <1508911578-24097-1-git-send-email-matthew@giassa.net> (raw)

Adding le16_to_cpu conversion in prism2sta.c, to resolve outstanding
sparse errors as noted in the current TODO in staging-next. Original
error:

  CHECK   drivers/staging//wlan-ng/prism2usb.c
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

Sparse error no longer present after change.

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-10-25  6:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25  6:06 Matthew Giassa [this message]
2017-11-03 11:49 ` Greg KH
2017-11-06 15:32   ` Matthew Giassa

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=1508911578-24097-1-git-send-email-matthew@giassa.net \
    --to=matthew@giassa.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®