[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1499005648-28914-2-git-send-email-janusz.lisiecki@gmail.com>
Date: Sun, 2 Jul 2017 16:27:28 +0200
From: Janusz Lisiecki <janusz.lisiecki@...il.com>
To: Wolfram Sang <wsa@...-dreams.de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Linux Driver Project Developer List
<driverdev-devel@...uxdriverproject.org>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Janusz Lisiecki <janusz.lisiecki@...il.com>
Subject: [PATCH 1/1] staging: ks7010: Fix cast to restricted __le16 in ks_wlan_net.c
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@...il.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
Powered by blists - more mailing lists