Skip to contentSkip to conversation

rndis_wlan: harmless issue calling set_bit()

PATCH Applied Dan Carpenter 2 participants 2 messages May 14, 2015 – May 26, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rndis_wlan: harmless issue calling set_bit()

These are used like:

	set_bit(WORK_LINK_UP, &priv->work_pending);

The problem is that set_bit() takes the actual bit number and not a mask so static checkers get upset. It doesn't affect run time because we do it consistently, but we may as well clean it up.

Fixes 6010ce07a66c ('rndis_wlan: do link-down state change in worker thread')
drivers/net/wireless/rndis_wlan.c +3 -3
index d72ff8e..96175a7 100644
@@ -356,9 +356,9 @@ struct ndis_80211_pmkid {
 #define CAP_MODE_80211G		4
 #define CAP_MODE_MASK		7
 
-#define WORK_LINK_UP		(1<<0)
-#define WORK_LINK_DOWN		(1<<1)
-#define WORK_SET_MULTICAST_LIST	(1<<2)
+#define WORK_LINK_UP		0
+#define WORK_LINK_DOWN		1
+#define WORK_SET_MULTICAST_LIST	2
 
 #define RNDIS_WLAN_ALG_NONE	0
 #define RNDIS_WLAN_ALG_WEP	(1<<0)
Applied
#1 lore raw
Quoted 11 lines

These are used like:

	set_bit(WORK_LINK_UP, &priv->work_pending);

The problem is that set_bit() takes the actual bit number and not a mask so static checkers get upset. It doesn't affect run time because we do it consistently, but we may as well clean it up.

Fixes 6010ce07a66c ('rndis_wlan: do link-down state change in worker thread')

Thanks, applied to wireless-drivers-next.git.

Kalle Valo