Skip to contentSkip to conversation

staging: rtl8723bs: remove braces around single statements

PATCH Superseded Abraham Samuel Adekunle 2 participants 3 messages Mar 25, 2025 – Mar 26, 2025 Staging

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: remove braces around single statements

The code contains braces around single statements in the if blocks which are unnecessary according to the Linux kernel coding style.

Remove the braces to improve readability and maintain consistency.

Reported by checkpatch:

WARNING: braces {} are not necessary for single statement blocks

---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +3 -4
index c60e179bb2e1..b17b295e8d3c 100644
@@ -56,9 +56,9 @@ int _ips_leave(struct adapter *padapter)
 		pwrpriv->ips_leave_cnts++;
 
 		result = rtw_ips_pwr_up(padapter);
-		if (result == _SUCCESS) {
+		if (result == _SUCCESS)
 			pwrpriv->rf_pwrstate = rf_on;
-		}
+
 		pwrpriv->bips_processing = false;
 
 		pwrpriv->bkeepfwalive = false;
@@ -549,9 +549,8 @@ void LeaveAllPowerSaveMode(struct adapter *Adapter)
 
 		LPS_Leave_check(Adapter);
 	} else {
-		if (adapter_to_pwrctl(Adapter)->rf_pwrstate == rf_off) {
+		if (adapter_to_pwrctl(Adapter)->rf_pwrstate == rf_off)
 			ips_leave(Adapter);
-		}
 	}
 }
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 19 lines · Abraham Samuel Adekunle

The code contains braces around single statements in the if blocks which are unnecessary according to the Linux kernel coding style.

Remove the braces to improve readability and maintain consistency.

Reported by checkpatch:

WARNING: braces {} are not necessary for single statement blocks

---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +0 -0
index c60e179bb2e1..b17b295e8d3c 100644

drivers/staging/rtl8723bs/core/rtw_pwrctrl.c int _ips_leave(struct adapter *padapter) · line 61

Quoted 8 lines
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +2 -2
@@ -56,9 +56,9 @@ int _ips_leave(struct adapter *padapter)
 		pwrpriv->ips_leave_cnts++;
 
 		result = rtw_ips_pwr_up(padapter);
-		if (result == _SUCCESS) {
+		if (result == _SUCCESS)
 			pwrpriv->rf_pwrstate = rf_on;
-		}
+

I'm not sure you need to add a blank line here?

julia

Quoted 19 lines
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +1 -3
 		pwrpriv->bips_processing = false;
 
 		pwrpriv->bkeepfwalive = false;
@@ -549,9 +549,8 @@ void LeaveAllPowerSaveMode(struct adapter *Adapter)
 
 		LPS_Leave_check(Adapter);
 	} else {
-		if (adapter_to_pwrctl(Adapter)->rf_pwrstate == rf_off) {
+		if (adapter_to_pwrctl(Adapter)->rf_pwrstate == rf_off)
 			ips_leave(Adapter);
-		}
 	}
 }
 
--

2.34.1

#2 lore raw
Quoted 35 lines · Julia Lawall
Quoted 19 lines · Abraham Samuel Adekunle

The code contains braces around single statements in the if blocks which are unnecessary according to the Linux kernel coding style.

Remove the braces to improve readability and maintain consistency.

Reported by checkpatch:

WARNING: braces {} are not necessary for single statement blocks

---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +0 -0
index c60e179bb2e1..b17b295e8d3c 100644

drivers/staging/rtl8723bs/core/rtw_pwrctrl.c int _ips_leave(struct adapter *padapter) · line 61

Quoted 8 lines
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +2 -2
@@ -56,9 +56,9 @@ int _ips_leave(struct adapter *padapter)
              pwrpriv->ips_leave_cnts++;
 
              result = rtw_ips_pwr_up(padapter);
-             if (result == _SUCCESS) {
+             if (result == _SUCCESS)
                      pwrpriv->rf_pwrstate = rf_on;
-             }
+

I'm not sure you need to add a blank line here?

Quoted 2 lines

julia

Thank you for your review. I will effect the change