Skip to contentSkip to conversation

staging: rtl8723bs: core fix warning "Comparison to bool"

PATCH In review Hariprasad Kelam 2 participants 2 messages May 12, 2019 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: core fix warning "Comparison to bool"

fix below issue reported by coccicheck drivers/staging/rtl8723bs/core/rtw_cmd.c:1741:7-17: WARNING: Comparison to bool

---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +1 -1
index ecaa769..fcd26e1 100644
@@ -1738,7 +1738,7 @@ static void rtw_chk_hi_queue_hdl(struct adapter *padapter)
 			pstapriv->tim_bitmap &= ~BIT(0);
 			pstapriv->sta_dz_bitmap &= ~BIT(0);
 
-			if (update_tim == true)
+			if (update_tim)
 				update_beacon(padapter, _TIM_IE_, NULL, true);
 		} else {/* re check again */
 			rtw_chk_hi_queue_cmd(padapter);
Signature · 1 line
2.7.4
#1 lore raw
Quoted 3 lines · Hariprasad Kelam

fix below issue reported by coccicheck drivers/staging/rtl8723bs/core/rtw_cmd.c:1741:7-17: WARNING: Comparison to bool

[]

drivers/staging/rtl8723bs/core/rtw_cmd.c

Quoted 1 line
drivers/staging/rtl8723bs/core/rtw_cmd.c +0 -0

[]

drivers/staging/rtl8723bs/core/rtw_cmd.c static void rtw_chk_hi_queue_hdl(struct adapter *padapter) · line 1744

Quoted 9 lines
drivers/staging/rtl8723bs/core/rtw_cmd.c +1 -1
@@ -1738,7 +1738,7 @@ static void rtw_chk_hi_queue_hdl(struct adapter *padapter)
 			pstapriv->tim_bitmap &= ~BIT(0);
 			pstapriv->sta_dz_bitmap &= ~BIT(0);
 
-			if (update_tim == true)
+			if (update_tim)
 				update_beacon(padapter, _TIM_IE_, NULL, true);
 		} else {/* re check again */
 			rtw_chk_hi_queue_cmd(padapter);

There are dozens of these in this file and
even more in the subsystem.

$ git grep -P '(==|!=)\s*(true|false)' drivers/staging/rtl8723bs/core/rtw_cmd.c | wc -l
22

When you submit a patch for a single file,
at least please try to do all the instances
in the file.