Skip to contentSkip to conversation

staging: rt8192u: Move constant in comparison to the RHS

PATCH New Simone Serra 1 participant 1 message Feb 24, 2021 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rt8192u: Move constant in comparison to the RHS

Fixes checkpatch warning:

WARNING: Comparisons should place the constant on the right side of the test

---
 drivers/staging/rtl8192u/r8192U_wx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8192u/r8192U_wx.c +1 -1
index d853586705fc..175bb8b15389 100644
@@ -726,7 +726,7 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
 			idx--;
 		group = ext->ext_flags & IW_ENCODE_EXT_GROUP_KEY;
 
-		if ((!group) || (IW_MODE_ADHOC == ieee->iw_mode) || (alg ==  KEY_TYPE_WEP40)) {
+		if ((!group) || (ieee->iw_mode == IW_MODE_ADHOC) || (alg ==  KEY_TYPE_WEP40)) {
 			if ((ext->key_len == 13) && (alg == KEY_TYPE_WEP40))
 				alg = KEY_TYPE_WEP104;
 			ieee->pairwise_key_type = alg;
Signature · 1 line
2.27.0