[PATCH v10] staging: rtl8723bs: remove commented-out code

Aadarsh Mandal posted 1 patch 4 hours ago
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 29 --------------------
1 file changed, 29 deletions(-)
[PATCH v10] staging: rtl8723bs: remove commented-out code
Posted by Aadarsh Mandal 4 hours ago
Remove code that is not used anywhere in driver.

Signed-off-by: Aadarsh Mandal <aadarshmandal9354@gmail.com>
---
v10:
 - Change in commit style.
v9:
 - Change in commit style.
v8:
 - Restore the formatting of non-commented code.
v7:
 - Change in commit style.
v6:
 - Change in commit style.
v5:
 - Change in commit style.
v4:
 - Remove extra space insertion.
 - Delete remaining commented-out code.
v3:
 - Add the extra space that count as insertion.
 - Remove unwanted addition.
v2:
 - Restore braces for standalone code blocks {}.
 - Delete reindented commented-out code and extra space.
v1:
 - Reindented commented-out code;extra space remained.
---
 drivers/staging/rtl8723bs/hal/sdio_halinit.c | 29 --------------------
 1 file changed, 29 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index f2f73c65a636..1281aaf0515f 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -46,8 +46,6 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter)
 	u16 value16;
 	u32 value32;
 	u8 ret;
-/* 	u8 bMacPwrCtrlOn; */
-
 
 	/*  all of these MUST be configured before power on */
 
@@ -69,10 +67,6 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter)
 	value16 |= EnPDN; /*  Enable HW power down and RF on */
 	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 */
 	value16 = rtw_read16(padapter, REG_CR);
@@ -359,7 +353,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);
@@ -410,9 +403,6 @@ static void _InitAdaptiveCtrl(struct adapter *padapter)
 	value32 |= RATE_RRSR_CCK_ONLY_1M;
 	rtw_write32(padapter, REG_RRSR, value32);
 
-	/*  CF-END Threshold */
-	/* m_spIoBase->rtw_write8(REG_CFEND_TH, 0x1); */
-
 	/*  SIFS (used in NAV) */
 	value16 = _SPEC_SIFS_CCK(0x10) | _SPEC_SIFS_OFDM(0x10);
 	rtw_write16(padapter, REG_SPEC_SIFS, value16);
@@ -486,9 +476,6 @@ static void _initSdioAggregationSetting(struct adapter *padapter)
 {
 	struct hal_com_data	*pHalData = GET_HAL_DATA(padapter);
 
-	/*  Tx aggregation setting */
-/* 	sdio_AggSettingTxUpdate(padapter); */
-
 	/*  Rx aggregation setting */
 	HalRxAggr8723BSdio(padapter);
 
@@ -640,9 +627,6 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)
 		return _SUCCESS;
 	}
 
-	/*  Disable Interrupt first. */
-/* 	rtw_hal_disable_interrupt(padapter); */
-
 	ret = _InitPowerOn_8723BS(padapter);
 	if (ret == _FAIL)
 		return _FAIL;
@@ -661,8 +645,6 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)
 
 	rtl8723b_InitializeFirmwareVars(padapter);
 
-/* 	SIC_Init(padapter); */
-
 	if (pwrctrlpriv->reg_rfoff)
 		pwrctrlpriv->rf_pwrstate = rf_off;
 
@@ -704,8 +686,6 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)
 	pHalData->RfRegChnlVal[1] =
 		PHY_QueryRFReg(padapter, (enum rf_path)1, RF_CHNLBW, bRFRegOffsetMask);
 
-
-	/* if (!pHalData->bMACFuncEnable) { */
 	_InitQueueReservedPage(padapter);
 	_InitTxBufferBoundary(padapter);
 
@@ -745,11 +725,6 @@ u32 rtl8723bs_hal_init(struct adapter *padapter)
 	rtw_hal_set_chnl_bw(padapter, padapter->registrypriv.channel,
 		CHANNEL_WIDTH_20, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HAL_PRIME_CHNL_OFFSET_DONT_CARE);
 
-	/*  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; */
-
 	rtl8723b_InitAntenna_Selection(padapter);
 
 	/*  */
@@ -791,8 +766,6 @@ 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; */
-
 	{
 		pwrctrlpriv->rf_pwrstate = rf_on;
 
@@ -1080,8 +1053,6 @@ static void _ReadPROMContent(struct adapter *padapter)
 	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; */
-
 	_ReadEfuseInfo8723BS(padapter);
 }
 
-- 
2.43.0
Re: [PATCH v10] staging: rtl8723bs: remove commented-out code
Posted by Dan Carpenter 3 hours ago
On Tue, Apr 14, 2026 at 12:05:34PM +0530, Aadarsh Mandal wrote:
> Remove code that is not used anywhere in driver.
> 
> Signed-off-by: Aadarsh Mandal <aadarshmandal9354@gmail.com>
> ---
> v10:
>  - Change in commit style.

Heh.

We really do want to know what changed between versions but this is
too vague to be useful.  The problem is that we are very lazy and
forgetful and we can't remember or be bothered to look it up.  If
we have a note, we easily check if you added a Signed-off-by line
we asked for or whatever.

So this should have been "The notes under the --- cut off line were
misnumbered.  Fix that."  It's not really fixed.  :P  But whatever
at this point I'm ready to just merge this.

Reviewed-by: Dan Carpenter <error27@gmail.com>

> v9:
>  - Change in commit style.

This should have been "Don't do unrelated white space changes".

> v8:
>  - Restore the formatting of non-commented code.

This one was probably intended to be the note for v9.  In v7 what
we complained about was that you said "no change" and we wondered
why you were resending patches with no change.  This message should
have been "Add better notes under the --- cut off line".

> v7:
>  - Change in commit style.

This one was "Add a Signed-off-by line."

regards,
dan carpenter
Re: [PATCH v10] staging: rtl8723bs: remove commented-out code
Posted by Luka Gejak 3 hours ago
On April 14, 2026 9:10:01 AM GMT+02:00, Dan Carpenter <error27@gmail.com> wrote:
>On Tue, Apr 14, 2026 at 12:05:34PM +0530, Aadarsh Mandal wrote:
>> Remove code that is not used anywhere in driver.
>> 
>> Signed-off-by: Aadarsh Mandal <aadarshmandal9354@gmail.com>
>> ---
>> v10:
>>  - Change in commit style.
>
>Heh.
>
>We really do want to know what changed between versions but this is
>too vague to be useful.  The problem is that we are very lazy and
>forgetful and we can't remember or be bothered to look it up.  If
>we have a note, we easily check if you added a Signed-off-by line
>we asked for or whatever.
>
>So this should have been "The notes under the --- cut off line were
>misnumbered.  Fix that."  It's not really fixed.  :P  But whatever
>at this point I'm ready to just merge this.
>
>Reviewed-by: Dan Carpenter <error27@gmail.com>

Dan is completely right that this series stretched for too long for a 
simple dead code removal therefore I agree with Dan to merge it as is.
Reviewed-by: Luka Gejak <luka.gejak@linux.dev>

>
>> v9:
>>  - Change in commit style.
>
>This should have been "Don't do unrelated white space changes".
>
>> v8:
>>  - Restore the formatting of non-commented code.
>
>This one was probably intended to be the note for v9.  In v7 what
>we complained about was that you said "no change" and we wondered
>why you were resending patches with no change.  This message should
>have been "Add better notes under the --- cut off line".
>
>> v7:
>>  - Change in commit style.
>
>This one was "Add a Signed-off-by line."
>
>regards,
>dan carpenter
>