[PATCH] staging: rtl8723bs: remove comparisons to true in ioctl_cfg80211.c

Subhang Mall posted 1 patch 1 week, 1 day ago
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[PATCH] staging: rtl8723bs: remove comparisons to true in ioctl_cfg80211.c
Posted by Subhang Mall 1 week, 1 day ago
There were multiple checkpatch.pl warnings in
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
relating to explicitly comparing a value to true;
comparing a boolean-like variable to true is
redundant.

Signed-off-by: Subhang Mall <subhangmall.os@gmail.com>
---
 drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index fd3bae31b0e..dc871076ca4 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -1033,7 +1033,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
 	struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
 	int ret = 0;
 
-	if (adapter_to_dvobj(padapter)->processing_dev_remove == true) {
+	if (adapter_to_dvobj(padapter)->processing_dev_remove) {
 		ret = -EPERM;
 		goto exit;
 	}
@@ -1140,7 +1140,7 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter)
 
 		/* report network only if the current channel set contains the channel to which this network belongs */
 		if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.configuration.ds_config) >= 0
-			&& true == rtw_validate_ssid(&(pnetwork->network.ssid))) {
+			&& rtw_validate_ssid(&(pnetwork->network.ssid))) {
 			/* ev =translate_scan(padapter, a, pnetwork, ev, stop); */
 			rtw_cfg80211_inform_bss(padapter, pnetwork);
 		}
@@ -1634,7 +1634,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
 
 	padapter->mlmepriv.not_indic_disco = true;
 
-	if (adapter_wdev_data(padapter)->block == true) {
+	if (adapter_wdev_data(padapter)->block) {
 		ret = -EBUSY;
 		goto exit;
 	}
-- 
2.54.0
Re: [PATCH] staging: rtl8723bs: remove comparisons to true in ioctl_cfg80211.c
Posted by Greg KH 3 days, 19 hours ago
On Sat, May 16, 2026 at 05:10:22PM -0700, Subhang Mall wrote:
> There were multiple checkpatch.pl warnings in
> drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> relating to explicitly comparing a value to true;
> comparing a boolean-like variable to true is
> redundant.
> 
> Signed-off-by: Subhang Mall <subhangmall.os@gmail.com>
> ---
>  drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> index fd3bae31b0e..dc871076ca4 100644
> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> @@ -1033,7 +1033,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
>  	struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
>  	int ret = 0;
>  
> -	if (adapter_to_dvobj(padapter)->processing_dev_remove == true) {
> +	if (adapter_to_dvobj(padapter)->processing_dev_remove) {
>  		ret = -EPERM;
>  		goto exit;
>  	}
> @@ -1140,7 +1140,7 @@ void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter)
>  
>  		/* report network only if the current channel set contains the channel to which this network belongs */
>  		if (rtw_ch_set_search_ch(padapter->mlmeextpriv.channel_set, pnetwork->network.configuration.ds_config) >= 0
> -			&& true == rtw_validate_ssid(&(pnetwork->network.ssid))) {
> +			&& rtw_validate_ssid(&(pnetwork->network.ssid))) {
>  			/* ev =translate_scan(padapter, a, pnetwork, ev, stop); */
>  			rtw_cfg80211_inform_bss(padapter, pnetwork);
>  		}
> @@ -1634,7 +1634,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
>  
>  	padapter->mlmepriv.not_indic_disco = true;
>  
> -	if (adapter_wdev_data(padapter)->block == true) {
> +	if (adapter_wdev_data(padapter)->block) {
>  		ret = -EBUSY;
>  		goto exit;
>  	}
> -- 
> 2.54.0
> 
> 

Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch did not apply to any known trees that Greg is in control
  of.  Possibly this is because you made it against Linus's tree, not
  the linux-next tree, which is where all of the development for the
  next version of the kernel is at.  Please refresh your patch against
  the linux-next tree, or even better yet, the development tree
  specified in the MAINTAINERS file for the subsystem you are submitting
  a patch for, and resend it.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot