From: Janusz Lisiecki <janusz.lisiecki@gmail.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Linux Driver Project Developer List
<driverdev-devel@linuxdriverproject.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Janusz Lisiecki <janusz.lisiecki@gmail.com>
Subject: [PATCH 1/1] staging: ks7010: Fix cast to restricted __le16 in ks_wlan_net.c
Date: Sun, 2 Jul 2017 16:27:28 +0200 [thread overview]
Message-ID: <1499005648-28914-2-git-send-email-janusz.lisiecki@gmail.com> (raw)
In-Reply-To: <1499005648-28914-1-git-send-email-janusz.lisiecki@gmail.com>
This patch fixes the following Sparse warnings in ks_wlan_net.c:
drivers/staging/ks7010/ks_wlan_net.c:1359:24: warning: cast to restricted __le16
Both sides of assignment are u16 so (as 'ap' is local_ap_t type and 'capability' member,
have the same as local 'capabilities' type of u16) 'le16_to_cpu' is not needed
Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com>
---
drivers/staging/ks7010/ks_wlan_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index 0c778aa..9a7fbe2 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -1356,7 +1356,7 @@ static inline char *ks_wlan_translate_scan(struct net_device *dev,
/* Add mode */
iwe.cmd = SIOCGIWMODE;
- capabilities = le16_to_cpu(ap->capability);
+ capabilities = ap->capability;
if (capabilities & (BSS_CAP_ESS | BSS_CAP_IBSS)) {
if (capabilities & BSS_CAP_ESS)
iwe.u.mode = IW_MODE_INFRA;
--
1.9.1
next prev parent reply other threads:[~2017-07-02 17:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-02 14:27 [PATCH 0/1] Fix cast to restricted __le16 in ks7010 driver Janusz Lisiecki
2017-07-02 14:27 ` Janusz Lisiecki [this message]
2017-07-02 19:38 ` [PATCH 1/1] staging: ks7010: Fix cast to restricted __le16 in ks_wlan_net.c Luc Van Oostenryck
2017-07-02 20:49 ` Janusz Lisiecki
2017-07-02 21:23 ` Luc Van Oostenryck
2017-07-03 4:43 ` Janusz Lisiecki
2017-07-03 4:41 ` [PATCH 0/1] Fix cast to restricted __le16 in ks7010 driver Janusz Lisiecki
2017-07-03 4:41 ` [PATCH 1/1] staging: ks7010: Fix cast to restricted __le16 in ks_wlan_net.c Janusz Lisiecki
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=1499005648-28914-2-git-send-email-janusz.lisiecki@gmail.com \
--to=janusz.lisiecki@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wsa@the-dreams.de \
/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®