Skip to contentSkip to conversation

staging: rtl8723bs: Remove camelcase in several files

PATCH Superseded Fabio M. De Francesco 2 participants 4 messages Apr 9, 2021 Staging

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/1 staging: rtl8723bs: Remove camelcase in several files

Remove camelcase in bFwCurrentInPSMode, a variable used by code of several subdirectories/files of the driver. Issue detected by checkpatch.pl. Delete the unnecessary "b" (that stands for "byte") from the beginning of the name.

---

Changes from v5: Edit against the wrong patch
Changes from v4: Mention the removal of the initial "b" in log message. Changes from v3: Fix errors in the format of the patch. Changes from v2: Remove unnecessary comment. Shortened a function name. Changes from v1: No changes to the code but only to the subject for the purpose to differentiate this patch because other removes of camelcase have been made in other files of the same directory.

 drivers/staging/rtl8723bs/core/rtw_cmd.c       |  2 +-
 drivers/staging/rtl8723bs/core/rtw_mlme.c      |  2 +-
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c   | 18 +++++++++---------
 drivers/staging/rtl8723bs/hal/hal_intf.c       |  2 +-
 drivers/staging/rtl8723bs/hal/rtl8723b_dm.c    |  6 +++---
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c  |  2 +-
 drivers/staging/rtl8723bs/hal/sdio_ops.c       | 14 +++++++-------
 .../staging/rtl8723bs/include/rtw_pwrctrl.h    |  2 +-
 8 files changed, 24 insertions(+), 24 deletions(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +1 -1
index baf8b1e0f43c..a08f22b53592 100644
@@ -1510,7 +1510,7 @@ static void rtw_lps_change_dtim_hdl(struct adapter *padapter, u8 dtim)
 	if (pwrpriv->dtim != dtim)
 		pwrpriv->dtim = dtim;
 
-	if ((pwrpriv->bFwCurrentInPSMode == true) && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) {
+	if ((pwrpriv->b_fw_current_in_ps_mode == true) && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) {
 		u8 ps_mode = pwrpriv->pwr_mode;
 
 		rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
drivers/staging/rtl8723bs/core/rtw_mlme.c +1 -1
index a7e40aaae2d9..51cea6cf46e7 100644
@@ -1684,7 +1684,7 @@ void rtw_dynamic_check_timer_handler(struct adapter *adapter)
 	if (adapter->net_closed)
 		return;
 
-	if ((adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+	if ((adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
 		&& !(hal_btcoex_IsBtControlLps(adapter))
 		) {
 		u8 bEnterPS;
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +9 -9
index f7465cf90c46..21e7a847866f 100644
@@ -365,7 +365,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
 			rtw_set_rpwm(padapter, PS_STATE_S4);
 
 			rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
-			pwrpriv->bFwCurrentInPSMode = false;
+			pwrpriv->b_fw_current_in_ps_mode = false;
 
 			hal_btcoex_LpsNotify(padapter, ps_mode);
 		}
@@ -377,7 +377,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
 
 			hal_btcoex_LpsNotify(padapter, ps_mode);
 
-			pwrpriv->bFwCurrentInPSMode = true;
+			pwrpriv->b_fw_current_in_ps_mode = true;
 			pwrpriv->pwr_mode = ps_mode;
 			pwrpriv->smart_ps = smart_ps;
 			pwrpriv->bcn_ant_mode = bcn_ant_mode;
@@ -734,7 +734,7 @@ s32 rtw_register_task_alive(struct adapter *padapter, u32 task)
 
 	register_task_alive(pwrctrl, task);
 
-	if (pwrctrl->bFwCurrentInPSMode) {
+	if (pwrctrl->b_fw_current_in_ps_mode) {
 		if (pwrctrl->cpwm < pslv) {
 			if (pwrctrl->cpwm < PS_STATE_S2)
 				res = _FAIL;
@@ -782,7 +782,7 @@ void rtw_unregister_task_alive(struct adapter *padapter, u32 task)
 
 	unregister_task_alive(pwrctrl, task);
 
-	if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->bFwCurrentInPSMode) {
+	if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->b_fw_current_in_ps_mode) {
 		if (pwrctrl->cpwm > pslv)
 			if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0))
 				rtw_set_rpwm(padapter, pslv);
@@ -819,7 +819,7 @@ s32 rtw_register_tx_alive(struct adapter *padapter)
 
 	register_task_alive(pwrctrl, XMIT_ALIVE);
 
-	if (pwrctrl->bFwCurrentInPSMode) {
+	if (pwrctrl->b_fw_current_in_ps_mode) {
 		if (pwrctrl->cpwm < pslv) {
 			if (pwrctrl->cpwm < PS_STATE_S2)
 				res = _FAIL;
@@ -864,7 +864,7 @@ s32 rtw_register_cmd_alive(struct adapter *padapter)
 
 	register_task_alive(pwrctrl, CMD_ALIVE);
 
-	if (pwrctrl->bFwCurrentInPSMode) {
+	if (pwrctrl->b_fw_current_in_ps_mode) {
 		if (pwrctrl->cpwm < pslv) {
 			if (pwrctrl->cpwm < PS_STATE_S2)
 				res = _FAIL;
@@ -909,7 +909,7 @@ void rtw_unregister_tx_alive(struct adapter *padapter)
 
 	unregister_task_alive(pwrctrl, XMIT_ALIVE);
 
-	if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->bFwCurrentInPSMode) {
+	if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->b_fw_current_in_ps_mode) {
 		if (pwrctrl->cpwm > pslv)
 			if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0))
 				rtw_set_rpwm(padapter, pslv);
@@ -945,7 +945,7 @@ void rtw_unregister_cmd_alive(struct adapter *padapter)
 
 	unregister_task_alive(pwrctrl, CMD_ALIVE);
 
-	if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->bFwCurrentInPSMode) {
+	if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->b_fw_current_in_ps_mode) {
 		if (pwrctrl->cpwm > pslv) {
 			if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0))
 				rtw_set_rpwm(padapter, pslv);
@@ -978,7 +978,7 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
 	pwrctrlpriv->power_mgnt = padapter->registrypriv.power_mgnt;/*  PS_MODE_MIN; */
 	pwrctrlpriv->bLeisurePs = pwrctrlpriv->power_mgnt != PS_MODE_ACTIVE;
 
-	pwrctrlpriv->bFwCurrentInPSMode = false;
+	pwrctrlpriv->b_fw_current_in_ps_mode = false;
 
 	pwrctrlpriv->rpwm = 0;
 	pwrctrlpriv->cpwm = PS_STATE_S4;
drivers/staging/rtl8723bs/hal/hal_intf.c +1 -1
index bc9ae2088754..a73c2f76628d 100644
@@ -348,7 +348,7 @@ void rtw_hal_dm_watchdog(struct adapter *padapter)
 
 void rtw_hal_dm_watchdog_in_lps(struct adapter *padapter)
 {
-	if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == true) {
+	if (adapter_to_pwrctl(padapter)->b_fw_current_in_ps_mode == true) {
 		if (padapter->HalFunc.hal_dm_watchdog_in_lps)
 			padapter->HalFunc.hal_dm_watchdog_in_lps(padapter); /* this function caller is in interrupt context */
 	}
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c +3 -3
index c2e9e4a0be22..265db187b8d5 100644
@@ -141,7 +141,7 @@ void rtl8723b_InitHalDm(struct adapter *Adapter)
 
 void rtl8723b_HalDmWatchDog(struct adapter *Adapter)
 {
-	bool bFwCurrentInPSMode = false;
+	bool b_fw_current_in_ps_mode = false;
 	bool bFwPSAwake = true;
 	u8 hw_init_completed = false;
 	struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
@@ -151,12 +151,12 @@ void rtl8723b_HalDmWatchDog(struct adapter *Adapter)
 	if (hw_init_completed == false)
 		goto skip_dm;
 
-	bFwCurrentInPSMode = adapter_to_pwrctl(Adapter)->bFwCurrentInPSMode;
+	b_fw_current_in_ps_mode = adapter_to_pwrctl(Adapter)->b_fw_current_in_ps_mode;
 	rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&bFwPSAwake));
 
 	if (
 		(hw_init_completed == true) &&
-		((!bFwCurrentInPSMode) && bFwPSAwake)
+		((!b_fw_current_in_ps_mode) && bFwPSAwake)
 	) {
 		/*  */
 		/*  Calculate Tx/Rx statistics. */
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +1 -1
index e31ad3feed62..7ebc438870fd 100644
@@ -430,7 +430,7 @@ void rtl8723b_InitializeFirmwareVars(struct adapter *padapter)
 	struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
 
 	/*  Init Fw LPS related. */
-	adapter_to_pwrctl(padapter)->bFwCurrentInPSMode = false;
+	adapter_to_pwrctl(padapter)->b_fw_current_in_ps_mode = false;
 
 	/* Init H2C cmd. */
 	rtw_write8(padapter, REG_HMETFR, 0x0f);
drivers/staging/rtl8723bs/hal/sdio_ops.c +7 -7
index af7f846f90fe..c78a6724fc1c 100644
@@ -173,7 +173,7 @@ static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr)
 	if (
 		((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
 		(!mac_pwr_ctrl_on) ||
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
 	) {
 		err = sd_cmd52_read(intfhdl, ftaddr, 4, (u8 *)&le_tmp);
 #ifdef SDIO_DEBUG_IO
@@ -230,7 +230,7 @@ static s32 sdio_readN(struct intf_hdl *intfhdl, u32 addr, u32 cnt, u8 *buf)
 	if (
 		((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
 		(!mac_pwr_ctrl_on) ||
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
 	)
 		return sd_cmd52_read(intfhdl, ftaddr, cnt, buf);
 
@@ -297,7 +297,7 @@ static s32 sdio_write32(struct intf_hdl *intfhdl, u32 addr, u32 val)
 	if (
 		((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
 		(!mac_pwr_ctrl_on) ||
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
 	) {
 		le_tmp = cpu_to_le32(val);
 
@@ -334,7 +334,7 @@ static s32 sdio_writeN(struct intf_hdl *intfhdl, u32 addr, u32 cnt, u8 *buf)
 	if (
 		((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
 		(!mac_pwr_ctrl_on) ||
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
 	)
 		return sd_cmd52_write(intfhdl, ftaddr, cnt, buf);
 
@@ -565,7 +565,7 @@ s32 sdio_local_read(
 	rtw_hal_get_hwreg(adapter, HW_VAR_APFM_ON_MAC, &mac_pwr_ctrl_on);
 	if (
 		(!mac_pwr_ctrl_on) ||
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
 	)
 		return sd_cmd52_read(intfhdl, addr, cnt, buf);
 
@@ -611,7 +611,7 @@ s32 sdio_local_write(
 	rtw_hal_get_hwreg(adapter, HW_VAR_APFM_ON_MAC, &mac_pwr_ctrl_on);
 	if (
 		(!mac_pwr_ctrl_on) ||
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
 	)
 		return sd_cmd52_write(intfhdl, addr, cnt, buf);
 
@@ -660,7 +660,7 @@ static u32 sdio_local_cmd53_read4byte(struct adapter *adapter, u32 addr)
 
 	hal_sdio_get_cmd_addr_8723b(adapter, SDIO_LOCAL_DEVICE_ID, addr, &addr);
 	rtw_hal_get_hwreg(adapter, HW_VAR_APFM_ON_MAC, &mac_pwr_ctrl_on);
-	if (!mac_pwr_ctrl_on || adapter_to_pwrctl(adapter)->bFwCurrentInPSMode) {
+	if (!mac_pwr_ctrl_on || adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode) {
 		sd_cmd52_read(intfhdl, addr, 4, (u8 *)&le_tmp);
 		val = le32_to_cpu(le_tmp);
 	} else {
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +1 -1
index 2e739a17dd95..fcb06a95fdf6 100644
@@ -203,7 +203,7 @@ struct pwrctrl_priv {
 	u8 LpsIdleCount;
 	u8 power_mgnt;
 	u8 org_power_mgnt;
-	u8 bFwCurrentInPSMode;
+	u8 b_fw_current_in_ps_mode;
 	unsigned long	DelayLPSLastTimeStamp;
 	s32		pnp_current_pwr_state;
 	u8 pnp_bstop_trx;
Signature · 1 line
2.31.1
author
#1 lore raw

Wrong patch again.

Fabio

Quoted 275 lines · Fabio M. De Francesco

Remove camelcase in bFwCurrentInPSMode, a variable used by code of several subdirectories/files of the driver. Issue detected by checkpatch.pl. Delete the unnecessary "b" (that stands for "byte") from the beginning of the name.

---

Changes from v5: Edit against the wrong patch
Changes from v4: Mention the removal of the initial "b" in log message. Changes from v3: Fix errors in the format of the patch. Changes from v2: Remove unnecessary comment. Shortened a function name. Changes from v1: No changes to the code but only to the subject for the purpose to differentiate this patch because other removes of camelcase have been made in other files of the same directory.

 drivers/staging/rtl8723bs/core/rtw_cmd.c       |  2 +-
 drivers/staging/rtl8723bs/core/rtw_mlme.c      |  2 +-
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c   | 18 +++++++++---------
 drivers/staging/rtl8723bs/hal/hal_intf.c       |  2 +-
 drivers/staging/rtl8723bs/hal/rtl8723b_dm.c    |  6 +++---
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c  |  2 +-
 drivers/staging/rtl8723bs/hal/sdio_ops.c       | 14 +++++++-------
 .../staging/rtl8723bs/include/rtw_pwrctrl.h    |  2 +-
 8 files changed, 24 insertions(+), 24 deletions(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +1 -1
index baf8b1e0f43c..a08f22b53592 100644
@@ -1510,7 +1510,7 @@ static void rtw_lps_change_dtim_hdl(struct adapter *padapter, u8 dtim)
        if (pwrpriv->dtim != dtim)
                pwrpriv->dtim = dtim;
 
-       if ((pwrpriv->bFwCurrentInPSMode == true) && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) {
+       if ((pwrpriv->b_fw_current_in_ps_mode == true) && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) {
                u8 ps_mode = pwrpriv->pwr_mode;
 
                rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
drivers/staging/rtl8723bs/core/rtw_mlme.c +1 -1
index a7e40aaae2d9..51cea6cf46e7 100644
@@ -1684,7 +1684,7 @@ void rtw_dynamic_check_timer_handler(struct adapter *adapter)
        if (adapter->net_closed)
                return;
 
-       if ((adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+       if ((adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
                && !(hal_btcoex_IsBtControlLps(adapter))
                ) {
                u8 bEnterPS;
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +9 -9
index f7465cf90c46..21e7a847866f 100644
@@ -365,7 +365,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
                        rtw_set_rpwm(padapter, PS_STATE_S4);
 
                        rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
-                       pwrpriv->bFwCurrentInPSMode = false;
+                       pwrpriv->b_fw_current_in_ps_mode = false;
 
                        hal_btcoex_LpsNotify(padapter, ps_mode);
                }
@@ -377,7 +377,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
 
                        hal_btcoex_LpsNotify(padapter, ps_mode);
 
-                       pwrpriv->bFwCurrentInPSMode = true;
+                       pwrpriv->b_fw_current_in_ps_mode = true;
                        pwrpriv->pwr_mode = ps_mode;
                        pwrpriv->smart_ps = smart_ps;
                        pwrpriv->bcn_ant_mode = bcn_ant_mode;
@@ -734,7 +734,7 @@ s32 rtw_register_task_alive(struct adapter *padapter, u32 task)
 
        register_task_alive(pwrctrl, task);
 
-       if (pwrctrl->bFwCurrentInPSMode) {
+       if (pwrctrl->b_fw_current_in_ps_mode) {
                if (pwrctrl->cpwm < pslv) {
                        if (pwrctrl->cpwm < PS_STATE_S2)
                                res = _FAIL;
@@ -782,7 +782,7 @@ void rtw_unregister_task_alive(struct adapter *padapter, u32 task)
 
        unregister_task_alive(pwrctrl, task);
 
-       if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->bFwCurrentInPSMode) {
+       if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->b_fw_current_in_ps_mode) {
                if (pwrctrl->cpwm > pslv)
                        if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0))
                                rtw_set_rpwm(padapter, pslv);
@@ -819,7 +819,7 @@ s32 rtw_register_tx_alive(struct adapter *padapter)
 
        register_task_alive(pwrctrl, XMIT_ALIVE);
 
-       if (pwrctrl->bFwCurrentInPSMode) {
+       if (pwrctrl->b_fw_current_in_ps_mode) {
                if (pwrctrl->cpwm < pslv) {
                        if (pwrctrl->cpwm < PS_STATE_S2)
                                res = _FAIL;
@@ -864,7 +864,7 @@ s32 rtw_register_cmd_alive(struct adapter *padapter)
 
        register_task_alive(pwrctrl, CMD_ALIVE);
 
-       if (pwrctrl->bFwCurrentInPSMode) {
+       if (pwrctrl->b_fw_current_in_ps_mode) {
                if (pwrctrl->cpwm < pslv) {
                        if (pwrctrl->cpwm < PS_STATE_S2)
                                res = _FAIL;
@@ -909,7 +909,7 @@ void rtw_unregister_tx_alive(struct adapter *padapter)
 
        unregister_task_alive(pwrctrl, XMIT_ALIVE);
 
-       if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->bFwCurrentInPSMode) {
+       if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->b_fw_current_in_ps_mode) {
                if (pwrctrl->cpwm > pslv)
                        if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0))
                                rtw_set_rpwm(padapter, pslv);
@@ -945,7 +945,7 @@ void rtw_unregister_cmd_alive(struct adapter *padapter)
 
        unregister_task_alive(pwrctrl, CMD_ALIVE);
 
-       if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->bFwCurrentInPSMode) {
+       if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->b_fw_current_in_ps_mode) {
                if (pwrctrl->cpwm > pslv) {
                        if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0))
                                rtw_set_rpwm(padapter, pslv);
@@ -978,7 +978,7 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
        pwrctrlpriv->power_mgnt = padapter->registrypriv.power_mgnt;/*  PS_MODE_MIN; */
        pwrctrlpriv->bLeisurePs = pwrctrlpriv->power_mgnt != PS_MODE_ACTIVE;
 
-       pwrctrlpriv->bFwCurrentInPSMode = false;
+       pwrctrlpriv->b_fw_current_in_ps_mode = false;
 
        pwrctrlpriv->rpwm = 0;
        pwrctrlpriv->cpwm = PS_STATE_S4;
drivers/staging/rtl8723bs/hal/hal_intf.c +1 -1
index bc9ae2088754..a73c2f76628d 100644
@@ -348,7 +348,7 @@ void rtw_hal_dm_watchdog(struct adapter *padapter)
 
 void rtw_hal_dm_watchdog_in_lps(struct adapter *padapter)
 {
-       if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == true) {
+       if (adapter_to_pwrctl(padapter)->b_fw_current_in_ps_mode == true) {
                if (padapter->HalFunc.hal_dm_watchdog_in_lps)
                        padapter->HalFunc.hal_dm_watchdog_in_lps(padapter); /* this function caller is in interrupt context */
        }
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c +3 -3
index c2e9e4a0be22..265db187b8d5 100644
@@ -141,7 +141,7 @@ void rtl8723b_InitHalDm(struct adapter *Adapter)
 
 void rtl8723b_HalDmWatchDog(struct adapter *Adapter)
 {
-       bool bFwCurrentInPSMode = false;
+       bool b_fw_current_in_ps_mode = false;
        bool bFwPSAwake = true;
        u8 hw_init_completed = false;
        struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
@@ -151,12 +151,12 @@ void rtl8723b_HalDmWatchDog(struct adapter *Adapter)
        if (hw_init_completed == false)
                goto skip_dm;
 
-       bFwCurrentInPSMode = adapter_to_pwrctl(Adapter)->bFwCurrentInPSMode;
+       b_fw_current_in_ps_mode = adapter_to_pwrctl(Adapter)->b_fw_current_in_ps_mode;
        rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&bFwPSAwake));
 
        if (
                (hw_init_completed == true) &&
-               ((!bFwCurrentInPSMode) && bFwPSAwake)
+               ((!b_fw_current_in_ps_mode) && bFwPSAwake)
        ) {
                /*  */
                /*  Calculate Tx/Rx statistics. */
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +1 -1
index e31ad3feed62..7ebc438870fd 100644
@@ -430,7 +430,7 @@ void rtl8723b_InitializeFirmwareVars(struct adapter *padapter)
        struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
 
        /*  Init Fw LPS related. */
-       adapter_to_pwrctl(padapter)->bFwCurrentInPSMode = false;
+       adapter_to_pwrctl(padapter)->b_fw_current_in_ps_mode = false;
 
        /* Init H2C cmd. */
        rtw_write8(padapter, REG_HMETFR, 0x0f);
drivers/staging/rtl8723bs/hal/sdio_ops.c +7 -7
index af7f846f90fe..c78a6724fc1c 100644
@@ -173,7 +173,7 @@ static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr)
        if (
                ((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
                (!mac_pwr_ctrl_on) ||
-               (adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+               (adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
        ) {
                err = sd_cmd52_read(intfhdl, ftaddr, 4, (u8 *)&le_tmp);
 #ifdef SDIO_DEBUG_IO
@@ -230,7 +230,7 @@ static s32 sdio_readN(struct intf_hdl *intfhdl, u32 addr, u32 cnt, u8 *buf)
        if (
                ((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
                (!mac_pwr_ctrl_on) ||
-               (adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+               (adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
        )
                return sd_cmd52_read(intfhdl, ftaddr, cnt, buf);
 
@@ -297,7 +297,7 @@ static s32 sdio_write32(struct intf_hdl *intfhdl, u32 addr, u32 val)
        if (
                ((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
                (!mac_pwr_ctrl_on) ||
-               (adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+               (adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
        ) {
                le_tmp = cpu_to_le32(val);
 
@@ -334,7 +334,7 @@ static s32 sdio_writeN(struct intf_hdl *intfhdl, u32 addr, u32 cnt, u8 *buf)
        if (
                ((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
                (!mac_pwr_ctrl_on) ||
-               (adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+               (adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
        )
                return sd_cmd52_write(intfhdl, ftaddr, cnt, buf);
 
@@ -565,7 +565,7 @@ s32 sdio_local_read(
        rtw_hal_get_hwreg(adapter, HW_VAR_APFM_ON_MAC, &mac_pwr_ctrl_on);
        if (
                (!mac_pwr_ctrl_on) ||
-               (adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+               (adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
        )
                return sd_cmd52_read(intfhdl, addr, cnt, buf);
 
@@ -611,7 +611,7 @@ s32 sdio_local_write(
        rtw_hal_get_hwreg(adapter, HW_VAR_APFM_ON_MAC, &mac_pwr_ctrl_on);
        if (
                (!mac_pwr_ctrl_on) ||
-               (adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+               (adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
        )
                return sd_cmd52_write(intfhdl, addr, cnt, buf);
 
@@ -660,7 +660,7 @@ static u32 sdio_local_cmd53_read4byte(struct adapter *adapter, u32 addr)
 
        hal_sdio_get_cmd_addr_8723b(adapter, SDIO_LOCAL_DEVICE_ID, addr, &addr);
        rtw_hal_get_hwreg(adapter, HW_VAR_APFM_ON_MAC, &mac_pwr_ctrl_on);
-       if (!mac_pwr_ctrl_on || adapter_to_pwrctl(adapter)->bFwCurrentInPSMode) {
+       if (!mac_pwr_ctrl_on || adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode) {
                sd_cmd52_read(intfhdl, addr, 4, (u8 *)&le_tmp);
                val = le32_to_cpu(le_tmp);
        } else {
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +1 -2
index 2e739a17dd95..fcb06a95fdf6 100644
@@ -203,7 +203,7 @@ struct pwrctrl_priv {
        u8 LpsIdleCount;
        u8 power_mgnt;
        u8 org_power_mgnt;
-       u8 bFwCurrentInPSMode;
+       u8 b_fw_current_in_ps_mode;
        unsigned long   DelayLPSLastTimeStamp;
        s32             pnp_current_pwr_state;
        u8 pnp_bstop_trx;
--

2.31.1

#2 lore raw
In reply to Fabio M. De Francesco
Quoted 4 lines · Fabio M. De Francesco

Remove camelcase in bFwCurrentInPSMode, a variable used by code of several subdirectories/files of the driver. Issue detected by checkpatch.pl. Delete the unnecessary "b" (that stands for "byte") from the beginning of the name.

I'm sorry, but this is still the wrong patch. Now you have b in the starting point and b_ in the ending point.

I would really suggest to start with a competely fresh Linux kernel, redo the patch by hand, and then send that.

julia

Quoted 275 lines

---

Changes from v5: Edit against the wrong patch
Changes from v4: Mention the removal of the initial "b" in log message. Changes from v3: Fix errors in the format of the patch. Changes from v2: Remove unnecessary comment. Shortened a function name. Changes from v1: No changes to the code but only to the subject for the purpose to differentiate this patch because other removes of camelcase have been made in other files of the same directory.

 drivers/staging/rtl8723bs/core/rtw_cmd.c       |  2 +-
 drivers/staging/rtl8723bs/core/rtw_mlme.c      |  2 +-
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c   | 18 +++++++++---------
 drivers/staging/rtl8723bs/hal/hal_intf.c       |  2 +-
 drivers/staging/rtl8723bs/hal/rtl8723b_dm.c    |  6 +++---
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c  |  2 +-
 drivers/staging/rtl8723bs/hal/sdio_ops.c       | 14 +++++++-------
 .../staging/rtl8723bs/include/rtw_pwrctrl.h    |  2 +-
 8 files changed, 24 insertions(+), 24 deletions(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +1 -1
index baf8b1e0f43c..a08f22b53592 100644
@@ -1510,7 +1510,7 @@ static void rtw_lps_change_dtim_hdl(struct adapter *padapter, u8 dtim)
 	if (pwrpriv->dtim != dtim)
 		pwrpriv->dtim = dtim;
 
-	if ((pwrpriv->bFwCurrentInPSMode == true) && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) {
+	if ((pwrpriv->b_fw_current_in_ps_mode == true) && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) {
 		u8 ps_mode = pwrpriv->pwr_mode;
 
 		rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
drivers/staging/rtl8723bs/core/rtw_mlme.c +1 -1
index a7e40aaae2d9..51cea6cf46e7 100644
@@ -1684,7 +1684,7 @@ void rtw_dynamic_check_timer_handler(struct adapter *adapter)
 	if (adapter->net_closed)
 		return;
 
-	if ((adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+	if ((adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
 		&& !(hal_btcoex_IsBtControlLps(adapter))
 		) {
 		u8 bEnterPS;
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +9 -9
index f7465cf90c46..21e7a847866f 100644
@@ -365,7 +365,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
 			rtw_set_rpwm(padapter, PS_STATE_S4);
 
 			rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, (u8 *)(&ps_mode));
-			pwrpriv->bFwCurrentInPSMode = false;
+			pwrpriv->b_fw_current_in_ps_mode = false;
 
 			hal_btcoex_LpsNotify(padapter, ps_mode);
 		}
@@ -377,7 +377,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8 ps_mode, u8 smart_ps, u8 bcn_a
 
 			hal_btcoex_LpsNotify(padapter, ps_mode);
 
-			pwrpriv->bFwCurrentInPSMode = true;
+			pwrpriv->b_fw_current_in_ps_mode = true;
 			pwrpriv->pwr_mode = ps_mode;
 			pwrpriv->smart_ps = smart_ps;
 			pwrpriv->bcn_ant_mode = bcn_ant_mode;
@@ -734,7 +734,7 @@ s32 rtw_register_task_alive(struct adapter *padapter, u32 task)
 
 	register_task_alive(pwrctrl, task);
 
-	if (pwrctrl->bFwCurrentInPSMode) {
+	if (pwrctrl->b_fw_current_in_ps_mode) {
 		if (pwrctrl->cpwm < pslv) {
 			if (pwrctrl->cpwm < PS_STATE_S2)
 				res = _FAIL;
@@ -782,7 +782,7 @@ void rtw_unregister_task_alive(struct adapter *padapter, u32 task)
 
 	unregister_task_alive(pwrctrl, task);
 
-	if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->bFwCurrentInPSMode) {
+	if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->b_fw_current_in_ps_mode) {
 		if (pwrctrl->cpwm > pslv)
 			if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0))
 				rtw_set_rpwm(padapter, pslv);
@@ -819,7 +819,7 @@ s32 rtw_register_tx_alive(struct adapter *padapter)
 
 	register_task_alive(pwrctrl, XMIT_ALIVE);
 
-	if (pwrctrl->bFwCurrentInPSMode) {
+	if (pwrctrl->b_fw_current_in_ps_mode) {
 		if (pwrctrl->cpwm < pslv) {
 			if (pwrctrl->cpwm < PS_STATE_S2)
 				res = _FAIL;
@@ -864,7 +864,7 @@ s32 rtw_register_cmd_alive(struct adapter *padapter)
 
 	register_task_alive(pwrctrl, CMD_ALIVE);
 
-	if (pwrctrl->bFwCurrentInPSMode) {
+	if (pwrctrl->b_fw_current_in_ps_mode) {
 		if (pwrctrl->cpwm < pslv) {
 			if (pwrctrl->cpwm < PS_STATE_S2)
 				res = _FAIL;
@@ -909,7 +909,7 @@ void rtw_unregister_tx_alive(struct adapter *padapter)
 
 	unregister_task_alive(pwrctrl, XMIT_ALIVE);
 
-	if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->bFwCurrentInPSMode) {
+	if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->b_fw_current_in_ps_mode) {
 		if (pwrctrl->cpwm > pslv)
 			if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0))
 				rtw_set_rpwm(padapter, pslv);
@@ -945,7 +945,7 @@ void rtw_unregister_cmd_alive(struct adapter *padapter)
 
 	unregister_task_alive(pwrctrl, CMD_ALIVE);
 
-	if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->bFwCurrentInPSMode) {
+	if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) && pwrctrl->b_fw_current_in_ps_mode) {
 		if (pwrctrl->cpwm > pslv) {
 			if ((pslv >= PS_STATE_S2) || (pwrctrl->alives == 0))
 				rtw_set_rpwm(padapter, pslv);
@@ -978,7 +978,7 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
 	pwrctrlpriv->power_mgnt = padapter->registrypriv.power_mgnt;/*  PS_MODE_MIN; */
 	pwrctrlpriv->bLeisurePs = pwrctrlpriv->power_mgnt != PS_MODE_ACTIVE;
 
-	pwrctrlpriv->bFwCurrentInPSMode = false;
+	pwrctrlpriv->b_fw_current_in_ps_mode = false;
 
 	pwrctrlpriv->rpwm = 0;
 	pwrctrlpriv->cpwm = PS_STATE_S4;
drivers/staging/rtl8723bs/hal/hal_intf.c +1 -1
index bc9ae2088754..a73c2f76628d 100644
@@ -348,7 +348,7 @@ void rtw_hal_dm_watchdog(struct adapter *padapter)
 
 void rtw_hal_dm_watchdog_in_lps(struct adapter *padapter)
 {
-	if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == true) {
+	if (adapter_to_pwrctl(padapter)->b_fw_current_in_ps_mode == true) {
 		if (padapter->HalFunc.hal_dm_watchdog_in_lps)
 			padapter->HalFunc.hal_dm_watchdog_in_lps(padapter); /* this function caller is in interrupt context */
 	}
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c +3 -3
index c2e9e4a0be22..265db187b8d5 100644
@@ -141,7 +141,7 @@ void rtl8723b_InitHalDm(struct adapter *Adapter)
 
 void rtl8723b_HalDmWatchDog(struct adapter *Adapter)
 {
-	bool bFwCurrentInPSMode = false;
+	bool b_fw_current_in_ps_mode = false;
 	bool bFwPSAwake = true;
 	u8 hw_init_completed = false;
 	struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
@@ -151,12 +151,12 @@ void rtl8723b_HalDmWatchDog(struct adapter *Adapter)
 	if (hw_init_completed == false)
 		goto skip_dm;
 
-	bFwCurrentInPSMode = adapter_to_pwrctl(Adapter)->bFwCurrentInPSMode;
+	b_fw_current_in_ps_mode = adapter_to_pwrctl(Adapter)->b_fw_current_in_ps_mode;
 	rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&bFwPSAwake));
 
 	if (
 		(hw_init_completed == true) &&
-		((!bFwCurrentInPSMode) && bFwPSAwake)
+		((!b_fw_current_in_ps_mode) && bFwPSAwake)
 	) {
 		/*  */
 		/*  Calculate Tx/Rx statistics. */
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +1 -1
index e31ad3feed62..7ebc438870fd 100644
@@ -430,7 +430,7 @@ void rtl8723b_InitializeFirmwareVars(struct adapter *padapter)
 	struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
 
 	/*  Init Fw LPS related. */
-	adapter_to_pwrctl(padapter)->bFwCurrentInPSMode = false;
+	adapter_to_pwrctl(padapter)->b_fw_current_in_ps_mode = false;
 
 	/* Init H2C cmd. */
 	rtw_write8(padapter, REG_HMETFR, 0x0f);
drivers/staging/rtl8723bs/hal/sdio_ops.c +7 -7
index af7f846f90fe..c78a6724fc1c 100644
@@ -173,7 +173,7 @@ static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr)
 	if (
 		((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
 		(!mac_pwr_ctrl_on) ||
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
 	) {
 		err = sd_cmd52_read(intfhdl, ftaddr, 4, (u8 *)&le_tmp);
 #ifdef SDIO_DEBUG_IO
@@ -230,7 +230,7 @@ static s32 sdio_readN(struct intf_hdl *intfhdl, u32 addr, u32 cnt, u8 *buf)
 	if (
 		((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
 		(!mac_pwr_ctrl_on) ||
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
 	)
 		return sd_cmd52_read(intfhdl, ftaddr, cnt, buf);
 
@@ -297,7 +297,7 @@ static s32 sdio_write32(struct intf_hdl *intfhdl, u32 addr, u32 val)
 	if (
 		((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
 		(!mac_pwr_ctrl_on) ||
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
 	) {
 		le_tmp = cpu_to_le32(val);
 
@@ -334,7 +334,7 @@ static s32 sdio_writeN(struct intf_hdl *intfhdl, u32 addr, u32 cnt, u8 *buf)
 	if (
 		((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 0x100)) ||
 		(!mac_pwr_ctrl_on) ||
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
 	)
 		return sd_cmd52_write(intfhdl, ftaddr, cnt, buf);
 
@@ -565,7 +565,7 @@ s32 sdio_local_read(
 	rtw_hal_get_hwreg(adapter, HW_VAR_APFM_ON_MAC, &mac_pwr_ctrl_on);
 	if (
 		(!mac_pwr_ctrl_on) ||
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
 	)
 		return sd_cmd52_read(intfhdl, addr, cnt, buf);
 
@@ -611,7 +611,7 @@ s32 sdio_local_write(
 	rtw_hal_get_hwreg(adapter, HW_VAR_APFM_ON_MAC, &mac_pwr_ctrl_on);
 	if (
 		(!mac_pwr_ctrl_on) ||
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
 	)
 		return sd_cmd52_write(intfhdl, addr, cnt, buf);
 
@@ -660,7 +660,7 @@ static u32 sdio_local_cmd53_read4byte(struct adapter *adapter, u32 addr)
 
 	hal_sdio_get_cmd_addr_8723b(adapter, SDIO_LOCAL_DEVICE_ID, addr, &addr);
 	rtw_hal_get_hwreg(adapter, HW_VAR_APFM_ON_MAC, &mac_pwr_ctrl_on);
-	if (!mac_pwr_ctrl_on || adapter_to_pwrctl(adapter)->bFwCurrentInPSMode) {
+	if (!mac_pwr_ctrl_on || adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode) {
 		sd_cmd52_read(intfhdl, addr, 4, (u8 *)&le_tmp);
 		val = le32_to_cpu(le_tmp);
 	} else {
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +1 -2
index 2e739a17dd95..fcb06a95fdf6 100644
@@ -203,7 +203,7 @@ struct pwrctrl_priv {
 	u8 LpsIdleCount;
 	u8 power_mgnt;
 	u8 org_power_mgnt;
-	u8 bFwCurrentInPSMode;
+	u8 b_fw_current_in_ps_mode;
 	unsigned long	DelayLPSLastTimeStamp;
 	s32		pnp_current_pwr_state;
 	u8 pnp_bstop_trx;
--

2.31.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20210409080014.25900-1-fmdefrancesco%40gmail.com.

#3 lore raw
Quoted 6 lines · CEST Julia Lawall
Quoted 4 lines · Fabio M. De Francesco

Remove camelcase in bFwCurrentInPSMode, a variable used by code of several subdirectories/files of the driver. Issue detected by checkpatch.pl. Delete the unnecessary "b" (that stands for "byte") from the beginning of the name.

Quoted 6 lines

I'm sorry, but this is still the wrong patch. Now you have b in the starting point and b_ in the ending point.

I would really suggest to start with a competely fresh Linux kernel, redo the patch by hand, and then send that.

I've just sent v8 of this patch.

I didn't start with a fresh Linux kernel, but I preferred to find a shorter
way: try to learn git rebase and the like. I hope it worked...

However, now I'd like to understand what should I do with another patch that I submitted yesterday because it logically follows this one.

I'm talking about "staging: rtl8723bs: Change the type and use of a variable". Is it still valid or should I send it again because it couldn't be applied before the camelcase edit?

Thanks in advance,

Fabio

Quoted 41 lines

julia

Quoted 39 lines

---

Changes from v5: Edit against the wrong patch
Changes from v4: Mention the removal of the initial "b" in log message. Changes from v3: Fix errors in the format of the patch. Changes from v2: Remove unnecessary comment. Shortened a function name. Changes from v1: No changes to the code but only to the subject for the purpose to differentiate this patch because other removes of camelcase have been made in other files of the same directory.

 drivers/staging/rtl8723bs/core/rtw_cmd.c       |  2 +-
 drivers/staging/rtl8723bs/core/rtw_mlme.c      |  2 +-
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c   | 18 +++++++++---------
 drivers/staging/rtl8723bs/hal/hal_intf.c       |  2 +-
 drivers/staging/rtl8723bs/hal/rtl8723b_dm.c    |  6 +++---
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c  |  2 +-
 drivers/staging/rtl8723bs/hal/sdio_ops.c       | 14 +++++++-------
 .../staging/rtl8723bs/include/rtw_pwrctrl.h    |  2 +-
 8 files changed, 24 insertions(+), 24 deletions(-)
(quoted diff) +0 -0

b/drivers/staging/rtl8723bs/core/rtw_cmd.c index
baf8b1e0f43c..a08f22b53592 100644

drivers/staging/rtl8723bs/core/rtw_cmd.c +0 -0
@@ -1510,7 +1510,7 @@ static void rtw_lps_change_dtim_hdl(struct

adapter *padapter, u8 dtim)>

drivers/staging/rtl8723bs/core/rtw_cmd.c +0 -1
 	if (pwrpriv->dtim != dtim)
 
 		pwrpriv->dtim = dtim;
 
-	if ((pwrpriv->bFwCurrentInPSMode == true) && (pwrpriv->pwr_mode 

PS_MODE_ACTIVE)) { + if ((pwrpriv->b_fw_current_in_ps_mode == true) &&
(pwrpriv->pwr_mode > PS_MODE_ACTIVE)) {>

drivers/staging/rtl8723bs/core/rtw_cmd.c +0 -0
 		u8 ps_mode = pwrpriv->pwr_mode;
 
 		rtw_hal_set_hwreg(padapter, HW_VAR_H2C_FW_PWRMODE, 

(u8

Quoted 29 lines
Quoted 29 lines
drivers/staging/rtl8723bs/core/rtw_cmd.c +0 -0
 		*)(&ps_mode));
(quoted diff) +0 -0

b/drivers/staging/rtl8723bs/core/rtw_mlme.c index
a7e40aaae2d9..51cea6cf46e7 100644

drivers/staging/rtl8723bs/core/rtw_mlme.c +0 -0
@@ -1684,7 +1684,7 @@ void rtw_dynamic_check_timer_handler(struct

adapter *adapter)>

drivers/staging/rtl8723bs/core/rtw_mlme.c +1 -1
 	if (adapter->net_closed)
 
 		return;
 
-	if ((adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+	if ((adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode)
 
 		&& !(hal_btcoex_IsBtControlLps(adapter))
 		) {
 		u8 bEnterPS;
(quoted diff) +0 -0

b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c index f7465cf90c46..21e7a847866f 100644

drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +0 -0
@@ -365,7 +365,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8

ps_mode, u8 smart_ps, u8 bcn_a>
rtw_set_rpwm(padapter, PS_STATE_S4);

Quoted 1 line
Quoted 1 line

rtw_hal_set_hwreg(padapter,

HW_VAR_H2C_FW_PWRMODE, (u8

Quoted 122 lines
Quoted 40 lines
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +1 -1
 			*)(&ps_mode));
 
-			pwrpriv->bFwCurrentInPSMode = false;
+			pwrpriv->b_fw_current_in_ps_mode = false;
 
 			hal_btcoex_LpsNotify(padapter, ps_mode);
 
 		}
@@ -377,7 +377,7 @@ void rtw_set_ps_mode(struct adapter *padapter, u8

ps_mode, u8 smart_ps, u8 bcn_a>

drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +2 -2
 			hal_btcoex_LpsNotify(padapter, ps_mode);
 
-			pwrpriv->bFwCurrentInPSMode = true;
+			pwrpriv->b_fw_current_in_ps_mode = true;
 
 			pwrpriv->pwr_mode = ps_mode;
 			pwrpriv->smart_ps = smart_ps;
 			pwrpriv->bcn_ant_mode = bcn_ant_mode;
@@ -734,7 +734,7 @@ s32 rtw_register_task_alive(struct adapter
 *padapter, u32 task)> 
 	register_task_alive(pwrctrl, task);
 
-	if (pwrctrl->bFwCurrentInPSMode) {
+	if (pwrctrl->b_fw_current_in_ps_mode) {
 
 		if (pwrctrl->cpwm < pslv) {
 
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +0 -1
 			if (pwrctrl->cpwm < PS_STATE_S2)
 
 				res = _FAIL;
@@ -782,7 +782,7 @@ void rtw_unregister_task_alive(struct adapter
 *padapter, u32 task)> 
 	unregister_task_alive(pwrctrl, task);
 
-	if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) &&

pwrctrl->bFwCurrentInPSMode) { + if ((pwrctrl->pwr_mode !=
PS_MODE_ACTIVE) && pwrctrl->b_fw_current_in_ps_mode) {>

drivers/staging/rtl8723bs/core/rtw_pwrctrl.c

Quoted 3 lines
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +0 -0
 		if (pwrctrl->cpwm > pslv)
 
 			if ((pslv >= PS_STATE_S2) || (pwrctrl-

alives == 0))

Quoted 37 lines
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +1 -1
 				rtw_set_rpwm(padapter, pslv);
@@ -819,7 +819,7 @@ s32 rtw_register_tx_alive(struct adapter *padapter)
 
 	register_task_alive(pwrctrl, XMIT_ALIVE);
 
-	if (pwrctrl->bFwCurrentInPSMode) {
+	if (pwrctrl->b_fw_current_in_ps_mode) {
 
 		if (pwrctrl->cpwm < pslv) {
 
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +1 -1
 			if (pwrctrl->cpwm < PS_STATE_S2)
 
 				res = _FAIL;
@@ -864,7 +864,7 @@ s32 rtw_register_cmd_alive(struct adapter
 *padapter)
 
 	register_task_alive(pwrctrl, CMD_ALIVE);
 
-	if (pwrctrl->bFwCurrentInPSMode) {
+	if (pwrctrl->b_fw_current_in_ps_mode) {
 
 		if (pwrctrl->cpwm < pslv) {
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +0 -1
 			if (pwrctrl->cpwm < PS_STATE_S2)
 
 				res = _FAIL;
@@ -909,7 +909,7 @@ void rtw_unregister_tx_alive(struct adapter
 *padapter)> 
 	unregister_task_alive(pwrctrl, XMIT_ALIVE);
 
-	if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) &&

pwrctrl->bFwCurrentInPSMode) { + if ((pwrctrl->pwr_mode !=
PS_MODE_ACTIVE) && pwrctrl->b_fw_current_in_ps_mode) {>

drivers/staging/rtl8723bs/core/rtw_pwrctrl.c

Quoted 3 lines
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +0 -0
 		if (pwrctrl->cpwm > pslv)
 
 			if ((pslv >= PS_STATE_S2) || (pwrctrl-

alives == 0))

drivers/staging/rtl8723bs/core/rtw_pwrctrl.c

Quoted 13 lines
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +0 -1
 				rtw_set_rpwm(padapter, pslv);
@@ -945,7 +945,7 @@ void rtw_unregister_cmd_alive(struct adapter
 *padapter)> 
 	unregister_task_alive(pwrctrl, CMD_ALIVE);
 
-	if ((pwrctrl->pwr_mode != PS_MODE_ACTIVE) &&

pwrctrl->bFwCurrentInPSMode) { + if ((pwrctrl->pwr_mode !=
PS_MODE_ACTIVE) && pwrctrl->b_fw_current_in_ps_mode) {>

drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +0 -0
 		if (pwrctrl->cpwm > pslv) {
 
 			if ((pslv >= PS_STATE_S2) || (pwrctrl-

alives == 0))

drivers/staging/rtl8723bs/core/rtw_pwrctrl.c void rtw_init_pwrctrl_priv(struct adapter · line 981

Quoted 8 lines
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +0 -0
 				rtw_set_rpwm(padapter, pslv);
@@ -978,7 +978,7 @@ void rtw_init_pwrctrl_priv(struct adapter
 *padapter)
 
 	pwrctrlpriv->power_mgnt = padapter->registrypriv.power_mgnt;/* 
 	PS_MODE_MIN; */ pwrctrlpriv->bLeisurePs = pwrctrlpriv-

power_mgnt !=

Quoted 14 lines
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +1 -1
 	PS_MODE_ACTIVE;> 
-	pwrctrlpriv->bFwCurrentInPSMode = false;
+	pwrctrlpriv->b_fw_current_in_ps_mode = false;
 
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +0 -0
 	pwrctrlpriv->rpwm = 0;
 	pwrctrlpriv->cpwm = PS_STATE_S4;
(quoted diff) +0 -0

b/drivers/staging/rtl8723bs/hal/hal_intf.c index
bc9ae2088754..a73c2f76628d 100644

drivers/staging/rtl8723bs/hal/hal_intf.c +0 -0
@@ -348,7 +348,7 @@ void rtw_hal_dm_watchdog(struct adapter *padapter)
 
Quoted 5 lines

drivers/staging/rtl8723bs/hal/hal_intf.c void rtw_hal_dm_watchdog(struct adapter *padapter)

Quoted 5 lines
drivers/staging/rtl8723bs/hal/hal_intf.c +1 -1
 void rtw_hal_dm_watchdog_in_lps(struct adapter *padapter)
 {
 
-	if (adapter_to_pwrctl(padapter)->bFwCurrentInPSMode == true) {
+	if (adapter_to_pwrctl(padapter)->b_fw_current_in_ps_mode == 

true) {

Quoted 6 lines
Quoted 4 lines
drivers/staging/rtl8723bs/hal/hal_intf.c +0 -0
 		if (padapter->HalFunc.hal_dm_watchdog_in_lps)
 

padapter-

HalFunc.hal_dm_watchdog_in_lps(padapter); /* this

Quoted 1 line

function caller is in interrupt context

*/>

Quoted 23 lines
Quoted 23 lines
drivers/staging/rtl8723bs/hal/hal_intf.c +0 -0
 	}
(quoted diff) +0 -0

b/drivers/staging/rtl8723bs/hal/rtl8723b_dm.c index c2e9e4a0be22..265db187b8d5 100644

drivers/staging/rtl8723bs/hal/rtl8723b_dm.c +1 -1
@@ -141,7 +141,7 @@ void rtl8723b_InitHalDm(struct adapter *Adapter)
 
 void rtl8723b_HalDmWatchDog(struct adapter *Adapter)
 {
 
-	bool bFwCurrentInPSMode = false;
+	bool b_fw_current_in_ps_mode = false;
 
 	bool bFwPSAwake = true;
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c +0 -0
 	u8 hw_init_completed = false;
 	struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);
@@ -151,12 +151,12 @@ void rtl8723b_HalDmWatchDog(struct adapter
 *Adapter)> 
 	if (hw_init_completed == false)
 
Quoted 7 lines

drivers/staging/rtl8723bs/hal/rtl8723b_dm.c void rtl8723b_HalDmWatchDog(struct adapter *Adapter)

Quoted 3 lines
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c +0 -1
 		goto skip_dm;
 
-	bFwCurrentInPSMode = adapter_to_pwrctl(Adapter)-

bFwCurrentInPSMode;

Quoted 3 lines
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c +1 -0
+	b_fw_current_in_ps_mode =

adapter_to_pwrctl(Adapter)->b_fw_current_in_ps_mode;>
rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)

(&bFwPSAwake));

Quoted 39 lines
Quoted 39 lines
drivers/staging/rtl8723bs/hal/rtl8723b_dm.c +1 -1
 	if (
 
 		(hw_init_completed == true) &&
 
-		((!bFwCurrentInPSMode) && bFwPSAwake)
+		((!b_fw_current_in_ps_mode) && bFwPSAwake)
 
 	) {
 
 		/*  */
 		/*  Calculate Tx/Rx statistics. */
(quoted diff) +0 -0

b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c index e31ad3feed62..7ebc438870fd 100644

drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +1 -1
@@ -430,7 +430,7 @@ void rtl8723b_InitializeFirmwareVars(struct adapter
 *padapter)> 
 	struct hal_com_data *pHalData = GET_HAL_DATA(padapter);
 
 	/*  Init Fw LPS related. */
 
-	adapter_to_pwrctl(padapter)->bFwCurrentInPSMode = false;
+	adapter_to_pwrctl(padapter)->b_fw_current_in_ps_mode = false;
 
drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +0 -0
 	/* Init H2C cmd. */
 	rtw_write8(padapter, REG_HMETFR, 0x0f);
(quoted diff) +0 -0

b/drivers/staging/rtl8723bs/hal/sdio_ops.c index
af7f846f90fe..c78a6724fc1c 100644

drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -0
@@ -173,7 +173,7 @@ static u32 sdio_read32(struct intf_hdl *intfhdl,

u32 addr)>
if (

Quoted 1 line
Quoted 1 line

((device_id == WLAN_IOREG_DEVICE_ID) && (offset <

0x100)) ||

Quoted 9 lines

drivers/staging/rtl8723bs/hal/sdio_ops.c static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr)

Quoted 4 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +1 -1
 		(!mac_pwr_ctrl_on) ||
 
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)-

b_fw_current_in_ps_mode)

Quoted 4 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -0
 	) {
 
 		err = sd_cmd52_read(intfhdl, ftaddr, 4, (u8 

*)&le_tmp);

Quoted 8 lines

drivers/staging/rtl8723bs/hal/sdio_ops.c

Quoted 8 lines

#ifdef SDIO_DEBUG_IO

drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -0
@@ -230,7 +230,7 @@ static s32 sdio_readN(struct intf_hdl *intfhdl, u32

addr, u32 cnt, u8 *buf)>

drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -0
 	if (
 
 		((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 

0x100)) ||

Quoted 8 lines

drivers/staging/rtl8723bs/hal/sdio_ops.c static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr)

Quoted 4 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +1 -1
 		(!mac_pwr_ctrl_on) ||
 
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)-

b_fw_current_in_ps_mode)

Quoted 3 lines

)

Quoted 7 lines

drivers/staging/rtl8723bs/hal/sdio_ops.c

Quoted 7 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -0
 		return sd_cmd52_read(intfhdl, ftaddr, cnt, buf);
@@ -297,7 +297,7 @@ static s32 sdio_write32(struct intf_hdl *intfhdl,

u32 addr, u32 val)>

drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -0
 	if (
 
 		((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 

0x100)) ||

Quoted 8 lines

drivers/staging/rtl8723bs/hal/sdio_ops.c static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr)

Quoted 4 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +1 -1
 		(!mac_pwr_ctrl_on) ||
 
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)-

b_fw_current_in_ps_mode)

Quoted 3 lines

) {

Quoted 7 lines

drivers/staging/rtl8723bs/hal/sdio_ops.c

Quoted 7 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -0
 		le_tmp = cpu_to_le32(val);
@@ -334,7 +334,7 @@ static s32 sdio_writeN(struct intf_hdl *intfhdl,

u32 addr, u32 cnt, u8 *buf)>

drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -0
 	if (
 
 		((device_id == WLAN_IOREG_DEVICE_ID) && (offset < 

0x100)) ||

Quoted 6 lines

drivers/staging/rtl8723bs/hal/sdio_ops.c static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr)

Quoted 4 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +1 -1
 		(!mac_pwr_ctrl_on) ||
 
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)-

b_fw_current_in_ps_mode)

Quoted 1 line
Quoted 7 lines

drivers/staging/rtl8723bs/hal/sdio_ops.c s32 sdio_local_read( · line 566

Quoted 7 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -0
 	)
 
 		return sd_cmd52_write(intfhdl, ftaddr, cnt, buf);
@@ -565,7 +565,7 @@ s32 sdio_local_read(
 
 	rtw_hal_get_hwreg(adapter, HW_VAR_APFM_ON_MAC, 

&mac_pwr_ctrl_on);

Quoted 8 lines

drivers/staging/rtl8723bs/hal/sdio_ops.c static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr)

Quoted 6 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +1 -1
 	if (
 
 		(!mac_pwr_ctrl_on) ||
 
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)-

b_fw_current_in_ps_mode)

Quoted 1 line
Quoted 7 lines

drivers/staging/rtl8723bs/hal/sdio_ops.c s32 sdio_local_write( · line 612

Quoted 7 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -0
 	)
 
 		return sd_cmd52_read(intfhdl, addr, cnt, buf);
@@ -611,7 +611,7 @@ s32 sdio_local_write(
 
 	rtw_hal_get_hwreg(adapter, HW_VAR_APFM_ON_MAC, 

&mac_pwr_ctrl_on);

Quoted 8 lines

drivers/staging/rtl8723bs/hal/sdio_ops.c static u32 sdio_read32(struct intf_hdl *intfhdl, u32 addr)

Quoted 6 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +1 -1
 	if (
 
 		(!mac_pwr_ctrl_on) ||
 
-		(adapter_to_pwrctl(adapter)->bFwCurrentInPSMode)
+		(adapter_to_pwrctl(adapter)-

b_fw_current_in_ps_mode)

Quoted 1 line
Quoted 7 lines
Quoted 7 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -0
 	)
 
 		return sd_cmd52_write(intfhdl, addr, cnt, buf);
@@ -660,7 +660,7 @@ static u32 sdio_local_cmd53_read4byte(struct

adapter *adapter, u32 addr)>
hal_sdio_get_cmd_addr_8723b(adapter, SDIO_LOCAL_DEVICE_ID,

addr,

Quoted 2 lines

drivers/staging/rtl8723bs/hal/sdio_ops.c

Quoted 2 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -0
 	&addr);
 	rtw_hal_get_hwreg(adapter, HW_VAR_APFM_ON_MAC, 

&mac_pwr_ctrl_on);

Quoted 39 lines
Quoted 39 lines
drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -1
-	if (!mac_pwr_ctrl_on ||

adapter_to_pwrctl(adapter)->bFwCurrentInPSMode) { + if
(!mac_pwr_ctrl_on || adapter_to_pwrctl(adapter)->b_fw_current_in_ps_mode) {>

drivers/staging/rtl8723bs/hal/sdio_ops.c +0 -0
 		sd_cmd52_read(intfhdl, addr, 4, (u8 *)&le_tmp);
 		val = le32_to_cpu(le_tmp);
 
 	} else {
(quoted diff) +0 -0

b/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h index 2e739a17dd95..fcb06a95fdf6 100644

drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +1 -1
@@ -203,7 +203,7 @@ struct pwrctrl_priv {
 
 	u8 LpsIdleCount;
 	u8 power_mgnt;
 	u8 org_power_mgnt;
 
-	u8 bFwCurrentInPSMode;
+	u8 b_fw_current_in_ps_mode;
 
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h +0 -1
 	unsigned long	DelayLPSLastTimeStamp;
 	s32		pnp_current_pwr_state;
 	u8 pnp_bstop_trx;
 
--

2.31.1

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit
https://groups.google.com/d/msgid/outreachy-kernel/20210409080014.2590
0-1-fmdefrancesco%40gmail.com.