Skip to contentSkip to conversation

staging: rtl8723bs: clean up redundant parentheses in rtw_mlme.c

PATCH In review Darshil Shah 2 participants 3 messages Dec 15, 2025 – Dec 17, 2025 1 message not in the archive Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: clean up redundant parentheses in rtw_mlme.c

- Removed unnecessary parentheses around if conditions
- Removed redundant '== true' and '== false' comparisons

---
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_mlme.c +2 -2
index 98704179ad35..e10f60d46dba 100644
@@ -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) {
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 1 line · Darshil Shah

- Removed unnecessary parentheses around if conditions

Only one if condition was changed.

Quoted 1 line

- 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

A message that is not in the archive (sent off-list or not yet received): CAGQ2yWkLp62n+KbA9fEhGJXxK7o_XiM8Xi0Zu==J+ko45h-QFw@mail.gmail.com

#3 lore raw

Thanks for the clarification.

This was intended as a minor style cleanup only.
Since there is no functional impact, I agree it’s not necessary. I’ll drop this patch.

Thanks for the review.

Quoted 27 lines · Darshil Shah

Thanks for the clarification.

This was intended as a minor style cleanup only.
Since there is no functional impact, I agree it’s not necessary. I’ll drop this patch.

Thanks for the review.

Quoted 17 lines · Greg KH
Quoted 1 line · Darshil Shah

- Removed unnecessary parentheses around if conditions

Only one if condition was changed.

Quoted 1 line

- 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