[PATCH 1/2] staging: rtl8723bs: fix coding style issues in sdio_halinit.c

Josh Hesketh
2026-04-11T21:40:21Z

Remove spaces before tabs and add missing empty lines after
variable declarations

Signed-off-by: Josh Hesketh <josh.hesketh@gmail.com>
---
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 58 +++++++++++---------
1 file changed, 31 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 0fa1b22fdf9a..81b6025fa8d9 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -31,6 +31,7 @@ static u8 CardEnable(struct adapter *padapter)
ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_enable_flow);
if (ret == _SUCCESS) {
u8 bMacPwrCtrlOn = true;
+
rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
}
} else
@@ -46,7 +47,7 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter)
u16 value16;
u32 value32;
u8 ret;
-/* u8 bMacPwrCtrlOn; */
+/* u8 bMacPwrCtrlOn; */

/* all of these MUST be configured before power on */
@@ -70,8 +71,8 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter)
rtw_write16(padapter, REG_APS_FSMCO, value16);

/* Enable CMD53 R/W Operation */
-/* bMacPwrCtrlOn = true; */
-/* rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); */
+/* bMacPwrCtrlOn = true; */
+/* rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn); */

rtw_write8(padapter, REG_CR, 0x00);
/* Enable MAC DMA/WMAC/SCHEDULE/SEC block */
@@ -214,6 +215,7 @@ static void _InitNormalChipOneOutEpPriority(struct adapter *Adapter)
struct hal_com_data *pHalData = GET_HAL_DATA(Adapter);

u16 value = 0;
+
switch (pHalData->OutEpQueueSel) {
case TX_SELE_HQ:
value = QUEUE_HIGH;
@@ -341,6 +343,7 @@ static void _InitTransferPageSize(struct adapter *padapter)
/* Tx page size is always 128. */

u8 value8;
+
value8 = _PSRX(PBP_128) | _PSTX(PBP_128);
rtw_write8(padapter, REG_PBP, value8);
}
@@ -357,7 +360,7 @@ static void _InitNetworkType(struct adapter *padapter)
value32 = rtw_read32(padapter, REG_CR);

/* TODO: use the other function to set network type */
-/* value32 = (value32 & ~MASK_NETTYPE) | _NETTYPE(NT_LINK_AD_HOC); */
+/* value32 = (value32 & ~MASK_NETTYPE) | _NETTYPE(NT_LINK_AD_HOC); */
value32 = (value32 & ~MASK_NETTYPE) | _NETTYPE(NT_LINK_AP);

rtw_write32(padapter, REG_CR, value32);
@@ -485,7 +488,7 @@ static void _initSdioAggregationSetting(struct adapter *padapter)
struct hal_com_data *pHalData = GET_HAL_DATA(padapter);

/* Tx aggregation setting */
-/* sdio_AggSettingTxUpdate(padapter); */
+/* sdio_AggSettingTxUpdate(padapter); */

/* Rx aggregation setting */
HalRxAggr8723BSdio(padapter);
@@ -639,7 +642,7 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)
}

/* Disable Interrupt first. */
-/* rtw_hal_disable_interrupt(padapter); */
+/* rtw_hal_disable_interrupt(padapter); */

ret = _InitPowerOn_8723BS(padapter);
if (ret == _FAIL)
@@ -659,7 +662,7 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)

rtl8723b_InitializeFirmwareVars(padapter);

-/* SIC_Init(padapter); */
+/* SIC_Init(padapter); */

if (pwrctrlpriv->reg_rfoff)
pwrctrlpriv->rf_pwrstate = rf_off;
@@ -745,8 +748,8 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)

/* Record original value for template. This is arough data, we can only use the data */
/* for power adjust. The value can not be adjustde according to different power!!! */
-/* pHalData->OriginalCckTxPwrIdx = pHalData->CurrentCckTxPwrIdx; */
-/* pHalData->OriginalOfdm24GTxPwrIdx = pHalData->CurrentOfdm24GTxPwrIdx; */
+/* pHalData->OriginalCckTxPwrIdx = pHalData->CurrentCckTxPwrIdx; */
+/* pHalData->OriginalOfdm24GTxPwrIdx = pHalData->CurrentOfdm24GTxPwrIdx; */

rtl8723b_InitAntenna_Selection(padapter);

@@ -789,7 +792,7 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)
/* ack for xmit mgmt frames. */
rtw_write32(padapter, REG_FWHW_TXQ_CTRL, rtw_read32(padapter, REG_FWHW_TXQ_CTRL) | BIT(12));

-/* pHalData->PreRpwmVal = SdioLocalCmd52Read1Byte(padapter, SDIO_REG_HRPWM1) & 0x80; */
+/* pHalData->PreRpwmVal = SdioLocalCmd52Read1Byte(padapter, SDIO_REG_HRPWM1) & 0x80; */

{
pwrctrlpriv->rf_pwrstate = rf_on;
@@ -842,7 +845,7 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)

/* */
/* Description: */
-/* RTL8723e card disable power sequence v003 which suggested by Scott. */
+/* RTL8723e card disable power sequence v003 which suggested by Scott. */
/* */
/* First created by tynli. 2011.01.28. */
/* */
@@ -854,7 +857,7 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
/* Run LPS WL RFOFF flow */
HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_enter_lps_flow);

- /* ==== Reset digital sequence ====== */
+ /* ==== Reset digital sequence ====== */

val = rtw_read8(padapter, REG_MCUFWDL);
if ((val & RAM_DL_SEL) && padapter->bFWReady) /* 8051 RAM code */
@@ -877,7 +880,7 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
val |= BIT(0);
rtw_write8(padapter, REG_RSV_CTRL + 1, val);

- /* ==== Reset digital sequence end ====== */
+ /* ==== Reset digital sequence end ====== */

bMacPwrCtrlOn = false; /* Disable CMD53 R/W */
rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
@@ -979,13 +982,13 @@ void rtl8723bs_interface_configure(struct adapter *padapter)
}

/* */
-/* Description: */
-/* We should set Efuse cell selection to WiFi cell in default. */
+/* Description: */
+/* We should set Efuse cell selection to WiFi cell in default. */
/* */
-/* Assumption: */
-/* PASSIVE_LEVEL */
+/* Assumption: */
+/* PASSIVE_LEVEL */
/* */
-/* Added by Roger, 2010.11.23. */
+/* Added by Roger, 2010.11.23. */
/* */
static void _EfuseCellSel(struct adapter *padapter)
{
@@ -1071,24 +1074,24 @@ static void _ReadEfuseInfo8723BS(struct adapter *padapter)
static void _ReadPROMContent(struct adapter *padapter)
{
struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(padapter);
- u8 eeValue;
+ u8 eeValue;

eeValue = rtw_read8(padapter, REG_9346CR);
/* To check system boot selection. */
pEEPROM->EepromOrEfuse = (eeValue & BOOT_FROM_EEPROM) ? true : false;
pEEPROM->bautoload_fail_flag = (eeValue & EEPROM_EN) ? false : true;

-/* pHalData->EEType = IS_BOOT_FROM_EEPROM(Adapter) ? EEPROM_93C46 : EEPROM_BOOT_EFUSE; */
+/* pHalData->EEType = IS_BOOT_FROM_EEPROM(Adapter) ? EEPROM_93C46 : EEPROM_BOOT_EFUSE; */

_ReadEfuseInfo8723BS(padapter);
}

/* */
-/* Description: */
-/* Read HW adapter information by E-Fuse or EEPROM according CR9346 reported. */
+/* Description: */
+/* Read HW adapter information by E-Fuse or EEPROM according CR9346 reported. */
/* */
-/* Assumption: */
-/* PASSIVE_LEVEL (SDIO interface) */
+/* Assumption: */
+/* PASSIVE_LEVEL (SDIO interface) */
/* */
/* */
static s32 _ReadAdapterInfo8723BS(struct adapter *padapter)
@@ -1147,6 +1150,7 @@ void SetHwReg8723BS(struct adapter *padapter, u8 variable, u8 *val)
case HW_VAR_SET_REQ_FW_PS:
{
u8 req_fw_ps = 0;
+
req_fw_ps = rtw_read8(padapter, 0x8f);
req_fw_ps |= 0x10;
rtw_write8(padapter, 0x8f, req_fw_ps);
@@ -1200,14 +1204,14 @@ void SetHwRegWithBuf8723B(struct adapter *padapter, u8 variable, u8 *pbuf, int l
}

/* */
-/* Description: */
-/* Query setting of specified variable. */
+/* Description: */
+/* Query setting of specified variable. */
/* */
u8 GetHalDefVar8723BSDIO(
struct adapter *Adapter, enum hal_def_variable eVariable, void *pValue
)
{
- u8 bResult = _SUCCESS;
+ u8 bResult = _SUCCESS;

switch (eVariable) {
case HAL_DEF_IS_SUPPORT_ANT_DIV:
--
2.53.0