Skip to contentSkip to conversation

staging: rtl8723bs: Change the type and use of a variable

PATCH In review Fabio M. De Francesco 1 participant 1 message Apr 9, 2021 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 staging: rtl8723bs: Change the type and use of a variable

Change the type of fw_current_in_ps_mode from u8 to bool, because it is used everywhere as a bool and, accordingly, it should be declared as a bool. Shorten the controlling
expression of an 'if' statement.

---
 drivers/staging/rtl8723bs/hal/hal_intf.c        | 2 +-
 drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/hal/hal_intf.c +1 -1
index 96fe172ced8d..8dc4dd8c6d4c 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)->fw_current_in_ps_mode == true) {
+	if (adapter_to_pwrctl(padapter)->fw_current_in_ps_mode) {
 		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/include/rtw_pwrctrl.h +1 -1
index 5450d20b44a6..c03ae33b0aa6 100644
@@ -203,7 +203,7 @@ struct pwrctrl_priv {
 	u8 LpsIdleCount;
 	u8 power_mgnt;
 	u8 org_power_mgnt;
-	u8 fw_current_in_ps_mode;
+	bool fw_current_in_ps_mode;
 	unsigned long	DelayLPSLastTimeStamp;
 	s32		pnp_current_pwr_state;
 	u8 pnp_bstop_trx;
Signature · 1 line
2.31.1