Skip to contentSkip to conversation

iwlegacy: 4965-mac: Simplify the calculation of variables

PATCH In review Jiapeng Chong 3 participants 3 messages Feb 4, 2021 – Feb 8, 2021

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

PATCH 1/1 iwlegacy: 4965-mac: Simplify the calculation of variables

Fix the following coccicheck warnings:

./drivers/net/wireless/intel/iwlegacy/4965-mac.c:2596:54-56: WARNING !A || A && B is equivalent to !A || B.

---
 drivers/net/wireless/intel/iwlegacy/4965-mac.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/wireless/intel/iwlegacy/4965-mac.c +1 -2
index 28675a4..52db532 100644
@@ -2593,8 +2593,7 @@ struct il_mod_params il4965_mod_params = {
 	 */
 	if (ret != IL_INVALID_STATION &&
 	    (!(il->stations[ret].used & IL_STA_UCODE_ACTIVE) ||
-	     ((il->stations[ret].used & IL_STA_UCODE_ACTIVE) &&
-	      (il->stations[ret].used & IL_STA_UCODE_INPROGRESS)))) {
+	      (il->stations[ret].used & IL_STA_UCODE_INPROGRESS))) {
 		IL_ERR("Requested station info for sta %d before ready.\n",
 		       ret);
 		ret = IL_INVALID_STATION;
Signature · 1 line
1.8.3.1
#2 lore raw
In reply to Jiapeng Chong
Quoted 8 lines · Jiapeng Chong

Fix the following coccicheck warnings:

./drivers/net/wireless/intel/iwlegacy/4965-mac.c:2596:54-56: WARNING !A || A && B is equivalent to !A || B.

Patch applied to wireless-drivers-next.git, thanks.

fcb8f3ca4b5b iwlegacy: 4965-mac: Simplify the calculation of variables

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/1612425608-40450-1-git-send-email-jiapeng.chong@linux.alibaba.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches