Re: [PATCH] staging: rtl8723bs: core fix warning "Comparison to bool"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux