LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: core  fix warning  "Comparison to bool"
@ 2019-05-12 12:19 Hariprasad Kelam
  2019-05-12 16:59 ` Joe Perches
  0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Kelam @ 2019-05-12 12:19 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Madhumitha Prabakaran, Hans de Goede,
	Arnd Bergmann, Emanuel Bennici, Dan Carpenter, Hariprasad Kelam,
	Hardik Singh Rathore, devel, linux-kernel, viswanath.barenkala

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

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index ecaa769..fcd26e1 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -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);
-- 
2.7.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: rtl8723bs: core  fix warning  "Comparison to bool"
  2019-05-12 12:19 [PATCH] staging: rtl8723bs: core fix warning "Comparison to bool" Hariprasad Kelam
@ 2019-05-12 16:59 ` Joe Perches
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2019-05-12 16:59 UTC (permalink / raw)
  To: Hariprasad Kelam, Greg Kroah-Hartman, Madhumitha Prabakaran,
	Hans de Goede, Arnd Bergmann, Emanuel Bennici, Dan Carpenter,
	Hardik Singh Rathore, devel, linux-kernel, viswanath.barenkala

On Sun, 2019-05-12 at 17:49 +0530, Hariprasad Kelam wrote:
> fix below issue reported by coccicheck
> drivers/staging/rtl8723bs/core/rtw_cmd.c:1741:7-17: WARNING: Comparison
> to bool
[]
> diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c
[]
> @@ -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.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-12 16:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-12 12:19 [PATCH] staging: rtl8723bs: core fix warning "Comparison to bool" Hariprasad Kelam
2019-05-12 16:59 ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).