[PATCH] staging: rtl8723bs: clean up redundant parentheses in rtw_mlme.c

Darshil Shah posted 1 patch 1 month, 3 weeks ago
drivers/staging/rtl8723bs/core/rtw_mlme.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] staging: rtl8723bs: clean up redundant parentheses in rtw_mlme.c
Posted by Darshil Shah 1 month, 3 weeks ago
- Removed unnecessary parentheses around if conditions
- Removed redundant '== true' and '== false' comparisons

Signed-off-by: Darshil Shah <darshilshah7070@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c
index 98704179ad35..e10f60d46dba 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c
@@ -710,8 +710,8 @@ void rtw_surveydone_event_callback(struct adapter	*adapter, u8 *pbuf)
 	rtw_set_signal_stat_timer(&adapter->recvpriv);
 
 	if (pmlmepriv->to_join) {
-		if ((check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == true)) {
-			if (check_fwstate(pmlmepriv, _FW_LINKED) == false) {
+		if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
+			if (!check_fwstate(pmlmepriv, _FW_LINKED)) {
 				set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
 
 				if (rtw_select_and_join_from_scanned_queue(pmlmepriv) == _SUCCESS) {
-- 
2.43.0
Re: [PATCH] staging: rtl8723bs: clean up redundant parentheses in rtw_mlme.c
Posted by Greg KH 1 month, 3 weeks ago
On Tue, Dec 16, 2025 at 02:39:01AM +0530, Darshil Shah wrote:
> - Removed unnecessary parentheses around if conditions

Only one if condition was changed.

> - Removed redundant '== true' and '== false' comparisons

Ok,I see why you removed this at the same time, but really, it was not
redundant, you just changed the operator to something else.

But why?  It's not really required by anything, what is driving this
change?

thanks,

greg k-h