Skip to contentSkip to conversation

drivers: staging: rtl8723bs: Fix coding style

PATCH In review Aymen Khalfa 2 participants 6 messages Oct 16, 2024 Staging

lore
Share & tools
lore
#0 lore raw

v2 cover drivers: staging: rtl8723bs: Fix coding style

Fix different coding style issues that generated warnings when running checkpatch.pl.

changes in v2:
- Fix cover letter.

Aymen Khalfa (4):
drivers: staging: rtl8723bs: Fix braces coding style issue.
drivers: staging: rtl8723bs: Fix space coding style issue.
drivers: staging: rtl8723bs: Fix missing blank line after declaration
coding style issue.
drivers: staging: rtl8723bs: Fix comment alignment coding style issue.

 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 27 ++++++++++----------
 1 file changed, 14 insertions(+), 13 deletions(-)
Signature · 1 line
2.34.1
#1 lore raw

PATCH v2 1/4 drivers: staging: rtl8723bs: Fix braces coding style issue.

- Remove unnecessary braces.

---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +4 -4
index dbfcbac3d855..1ced6f7ac552 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;
@@ -556,9 +556,9 @@ 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
#2 lore raw

PATCH v2 2/4 drivers: staging: rtl8723bs: Fix space coding style issue.

In reply to Aymen Khalfa

- Remove unnecessary space before tab.

---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +4 -4
index 1ced6f7ac552..56a85174965c 100644
@@ -436,8 +436,8 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms)
 }
 
 /*  */
-/* 	Description: */
-/* 		Enter the leisure power save mode. */
+/*	Description: */
+/*		Enter the leisure power save mode. */
 /*  */
 void LPS_Enter(struct adapter *padapter, const char *msg)
 {
@@ -476,8 +476,8 @@ void LPS_Enter(struct adapter *padapter, const char *msg)
 }
 
 /*  */
-/* 	Description: */
-/* 		Leave the leisure power save mode. */
+/*	Description: */
+/*		Leave the leisure power save mode. */
 /*  */
 void LPS_Leave(struct adapter *padapter, const char *msg)
 {
Signature · 1 line
2.34.1
#3 lore raw

PATCH v2 3/4 drivers: staging: rtl8723bs: Fix missing blank line after declaration coding style issue.

In reply to Aymen Khalfa

- Add a blank line after declaring struct.

---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +1 -0
index 56a85174965c..cc4d08ce1d2e 100644
@@ -1011,6 +1011,7 @@ void rtw_free_pwrctrl_priv(struct adapter *adapter)
 inline void rtw_set_ips_deny(struct adapter *padapter, u32 ms)
 {
 	struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
+
 	pwrpriv->ips_deny_time = jiffies + msecs_to_jiffies(ms);
 }
 
Signature · 1 line
2.34.1
#4 lore raw

PATCH v2 4/4 drivers: staging: rtl8723bs: Fix comment alignment coding style issue.

In reply to Aymen Khalfa

- Align * on block comment.

---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +5 -5
index cc4d08ce1d2e..5566c01193fe 100644
@@ -1016,11 +1016,11 @@ inline void rtw_set_ips_deny(struct adapter *padapter, u32 ms)
 }
 
 /*
-* rtw_pwr_wakeup - Wake the NIC up from: 1)IPS. 2)USB autosuspend
-* @adapter: pointer to struct adapter structure
-* @ips_deffer_ms: the ms will prevent from falling into IPS after wakeup
-* Return _SUCCESS or _FAIL
-*/
+ * rtw_pwr_wakeup - Wake the NIC up from: 1)IPS. 2)USB autosuspend
+ * @adapter: pointer to struct adapter structure
+ * @ips_deffer_ms: the ms will prevent from falling into IPS after wakeup
+ * Return _SUCCESS or _FAIL
+ */
 
 int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *caller)
 {
Signature · 1 line
2.34.1
#5 lore raw
In reply to Aymen Khalfa
Quoted 5 lines · Aymen Khalfa

Fix different coding style issues that generated warnings when running checkpatch.pl.

changes in v2:
- Fix cover letter.

You basically never need to send a v2 for cover letters.

regards,
dan carpenter