[PATCH] staging: rtl8723bs: fixed the trailing whitespaces/commented code

Aadarsh Mandal
2026-03-18T02:10:16Z

fixed the warnings,reported by checkpatch in
drivers/staging/rtl8723bs/hal/sdio_halinit.c

It mainly included the leading whitespace errors and commented line
of codes, deleted those lines rebuild the module and it didn't produced
any errors. one warning remains, fixing it breaks the logic.

Signed-off-by: Aadarsh Mandal <aadarshmandal9354@gmail.com>
---
Note:
* This patch is part of the GSoC2026 application process for device tree bindings conversions
* https://github.com/LinuxFoundationGSoC/ProjectIdeas/wiki/GSoC-2026-Device-Tree-Bindings

drivers/staging/rtl8723bs/hal/sdio_halinit.c | 54 ++++++++++----------
1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index e32f051ed415..70a5213ae52a 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -46,7 +46,7 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter)
u16 value16;
u32 value32;
u8 ret;
-/* u8 bMacPwrCtrlOn; */
+

/* all of these MUST be configured before power on */
@@ -70,8 +70,6 @@ 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); */

rtw_write8(padapter, REG_CR, 0x00);
/* Enable MAC DMA/WMAC/SCHEDULE/SEC block */
@@ -214,6 +212,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 +340,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 +357,6 @@ 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_AP);

rtw_write32(padapter, REG_CR, value32);
@@ -485,7 +484,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 +638,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 +658,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 +744,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 +788,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 +841,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 +853,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 +876,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 +978,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 +1070,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 +1146,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 +1200,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.43.0