Skip to contentSkip to conversation

staging: rtl8723bs: collapse duplicate goto exit conditions

PATCH In review Marco Antonio Solis Segura 2 participants 3 messages Mar 17 – Mar 18 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: collapse duplicate goto exit conditions

Combine _FAIL and RTW_RX_HANDLED cases into a single conditional, removing redundant branches and simplifying control flow. No functional changes intended.

---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +1 -5
index 337671b1211f..20f5f8760ba0 100644
@@ -1339,12 +1339,8 @@ static signed int validate_recv_data_frame(struct adapter *adapter, union recv_f
 
 	}
 
-	if (ret == _FAIL) {
+	if (ret == _FAIL || ret == RTW_RX_HANDLED)
 		goto exit;
-	} else if (ret == RTW_RX_HANDLED) {
-		goto exit;
-	}
-
 
 	if (!psta) {
 		ret = _FAIL;
Signature · 1 line
2.53.0
maintainer
#1 lore raw
Quoted 31 lines · Marco Antonio Solis Segura

Combine _FAIL and RTW_RX_HANDLED cases into a single conditional, removing redundant branches and simplifying control flow. No functional changes intended.

---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +1 -5
index 337671b1211f..20f5f8760ba0 100644
@@ -1339,12 +1339,8 @@ static signed int validate_recv_data_frame(struct adapter *adapter, union recv_f
 
 	}
 
-	if (ret == _FAIL) {
+	if (ret == _FAIL || ret == RTW_RX_HANDLED)
 		goto exit;
-	} else if (ret == RTW_RX_HANDLED) {
-		goto exit;
-	}
-
 
 	if (!psta) {
 		ret = _FAIL;
Signature · 1 line
2.53.0

Someone sent this _right_ before you did:

	https://lore.kernel.org/r/[email protected]

Are you all working on this together? What project is asking you to send patches for this driver?

thanks,

greg k-h

#2 lore raw
Quoted 9 lines · Greg KH

Someone sent this _right_ before you did:

        https://lore.kernel.org/r/[email protected]

Are you all working on this together? What project is asking you to send patches for this driver?

thanks,

greg k-h

Hi Greg,

No, I am not working with Giacomo or part of any organized project. I'm an independent developer working on my own to improve my systems engineering skills and contribute to the kernel.

Since Giacomo's patch was sent first, please feel free to drop mine. I'll focus on fixing some checkpatch.pl false positives as Dan Carpenter suggested in another thread.

Thanks for your time,

Marco Solis