Skip to contentSkip to conversation

staging: rtl8723bs: checkpatch cleanup rtw_btcoex.c

PATCH In review Linus Probert 2 participants 4 messages Apr 3 – Apr 27 Staging

lore
Share & tools
lore
#0 lore raw

cover staging: rtl8723bs: checkpatch cleanup rtw_btcoex.c

Cleans up all remaining checkpatch checks in rtw_btcoex.c excluding "Avoid CamelCase" checks since the remaining ones are defined in separate headers.

Linus Probert (2):
staging: rtl8723bs: correct logical continuation check in rtw_btcoex.c
staging: rtl8723bs: remove multiple blank lines in rtw_btcoex.c

 drivers/staging/rtl8723bs/core/rtw_btcoex.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Signature · 1 line
2.53.0
#1 lore raw

PATCH 1/2 staging: rtl8723bs: correct logical continuation check in rtw_btcoex.c

Corrects logical continuation placement in rtw_btcoex.c Discovered and verified with checkpatch.pl

---
 drivers/staging/rtl8723bs/core/rtw_btcoex.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_btcoex.c +2 -2
index 0191a943f0a4..caa757b8dc0a 100644
@@ -10,8 +10,8 @@
 
 void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 media_status)
 {
-	if ((media_status == RT_MEDIA_CONNECT)
-		&& (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)) {
+	if (media_status == RT_MEDIA_CONNECT &&
+	    check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true) {
 		rtw_hal_set_hwreg(padapter, HW_VAR_DL_RSVD_PAGE, NULL);
 	}
 
Signature · 1 line
2.53.0
#2 lore raw

Re: [PATCH 1/2] staging: rtl8723bs: correct logical continuation check in rtw_btcoex.c

Quoted 26 lines · Linus Probert

Corrects logical continuation placement in rtw_btcoex.c Discovered and verified with checkpatch.pl

---
 drivers/staging/rtl8723bs/core/rtw_btcoex.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_btcoex.c +2 -2
index 0191a943f0a4..caa757b8dc0a 100644
@@ -10,8 +10,8 @@
 
 void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 media_status)
 {
-	if ((media_status == RT_MEDIA_CONNECT)
-		&& (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)) {
+	if (media_status == RT_MEDIA_CONNECT &&
+	    check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true) {
 		rtw_hal_set_hwreg(padapter, HW_VAR_DL_RSVD_PAGE, NULL);
 	}
 
Signature · 1 line
2.53.0

I hate this checkpatch "warning" as you now need to remember what the order of operations is :(

#3 lore raw

PATCH 2/2 staging: rtl8723bs: remove multiple blank lines in rtw_btcoex.c

In reply to Linus Probert

Removes multiple blank lines in rtw_btcoex.c.
Discovered and verified using checkpatch.pl

---
 drivers/staging/rtl8723bs/core/rtw_btcoex.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/rtl8723bs/core/rtw_btcoex.c +0 -1
index caa757b8dc0a..574c672419e6 100644
@@ -65,7 +65,6 @@ void rtw_btcoex_LPS_Leave(struct adapter *padapter)
 {
 	struct pwrctrl_priv *pwrpriv;
 
-
 	pwrpriv = adapter_to_pwrctl(padapter);
 
 	if (pwrpriv->pwr_mode != PS_MODE_ACTIVE) {
Signature · 1 line
2.53.0