Skip to contentSkip to conversation

staging: rtl8723bs: clean up checkpatch warnings in rtw_btcoex.c

PATCH In review Azamat Rakhim 2 participants 2 messages Feb 7 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: clean up checkpatch warnings in rtw_btcoex.c

Remove unnecessary comparison to true and extra blank lines to address checkpatch warnings.

---
 drivers/staging/rtl8723bs/core/rtw_btcoex.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtl8723bs/core/rtw_btcoex.c +1 -3
index f4b19ef7b341..8c17ac994bbc 100644
@@ -11,7 +11,7 @@
 void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 media_status)
 {
 	if ((media_status == RT_MEDIA_CONNECT)
-		&& (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)) {
+		&& (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE))) {
 		rtw_hal_set_hwreg(padapter, HW_VAR_DL_RSVD_PAGE, NULL);
 	}
 
@@ -54,7 +54,6 @@ void rtw_btcoex_LPS_Enter(struct adapter *padapter)
 	struct pwrctrl_priv *pwrpriv;
 	u8 lps_val;
 
-
 	pwrpriv = adapter_to_pwrctl(padapter);
 
 	pwrpriv->bpower_saving = true;
@@ -66,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.52.0
#1 lore raw
Quoted 13 lines · Azamat Rakhim

Remove unnecessary comparison to true and extra blank lines to address checkpatch warnings.

---
 drivers/staging/rtl8723bs/core/rtw_btcoex.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtl8723bs/core/rtw_btcoex.c +0 -0
index f4b19ef7b341..8c17ac994bbc 100644

drivers/staging/rtl8723bs/core/rtw_btcoex.c line 16

Quoted 7 lines
drivers/staging/rtl8723bs/core/rtw_btcoex.c +1 -1
@@ -11,7 +11,7 @@
 void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, u8 media_status)
 {
 	if ((media_status == RT_MEDIA_CONNECT)
-		&& (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)) {
+		&& (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE))) {
 		rtw_hal_set_hwreg(padapter, HW_VAR_DL_RSVD_PAGE, NULL);
 	}

You fixed one checkpatch.pl error on this line, but left another one. Logical operators need to go at the end of the previous line not the beginning of it. So that'd be "if ((media_status == RT_MEDIA_CONNECT) &&".

Quoted 10 lines
drivers/staging/rtl8723bs/core/rtw_btcoex.c +0 -1
@@ -54,7 +54,6 @@ void rtw_btcoex_LPS_Enter(struct adapter *padapter)
 	struct pwrctrl_priv *pwrpriv;
 	u8 lps_val;
 
-
 	pwrpriv = adapter_to_pwrctl(padapter);
 
 	pwrpriv->bpower_saving = true;

drivers/staging/rtl8723bs/core/rtw_btcoex.c void rtw_btcoex_LPS_Leave(struct adapter *padapter) · line 70

Quoted 7 lines
drivers/staging/rtl8723bs/core/rtw_btcoex.c +0 -1
@@ -66,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) {

These whitespace fixes should be their own patch. Please keep one logical change per patch.

Also, your subject line should say what you fixed not the tool you used to find it. Next time before sending patches off run "$ ./scripts/checkpatch.pl --strict <patch>" to find problems like this.

Thanks,

ET