* [PATCH] staging: rtl8723bs: remove dump_chip_info() function
@ 2026-04-21 5:15 Nikolay Kulikov
2026-04-21 14:26 ` Luka Gejak
0 siblings, 1 reply; 2+ messages in thread
From: Nikolay Kulikov @ 2026-04-21 5:15 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-staging, Nikolay Kulikov
The dump_chip_info() function formats chip version information into a
local 128-byte buffer using the scnprintf(). This buffer was previously
passed to the DBG_871X macro.
Commit 968b15adb0ea ("staging: rtl8723bs: remove all DBG_871X logs")
removed the macro, leaving the buffer formatted but never used or output
anywhere.
dump_chip_info() is now useless, so remove it and its call from
ReadChipVersion8723B().
Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
---
drivers/staging/rtl8723bs/hal/hal_com.c | 42 -------------------
.../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 -
drivers/staging/rtl8723bs/include/hal_com.h | 2 -
3 files changed, 46 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
index 728a2171fbcb..0cafebd7b0c9 100644
--- a/drivers/staging/rtl8723bs/hal/hal_com.c
+++ b/drivers/staging/rtl8723bs/hal/hal_com.c
@@ -30,48 +30,6 @@ void rtw_hal_data_deinit(struct adapter *padapter)
}
}
-
-void dump_chip_info(struct hal_version chip_version)
-{
- char buf[128];
- size_t cnt = 0;
-
- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "Chip Version Info: CHIP_8723B_%s_",
- IS_NORMAL_CHIP(chip_version) ? "Normal_Chip" : "Test_Chip");
-
- if (IS_CHIP_VENDOR_TSMC(chip_version))
- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "TSMC_");
- else if (IS_CHIP_VENDOR_UMC(chip_version))
- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "UMC_");
- else if (IS_CHIP_VENDOR_SMIC(chip_version))
- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "SMIC_");
-
- if (IS_A_CUT(chip_version))
- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "A_CUT_");
- else if (IS_B_CUT(chip_version))
- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "B_CUT_");
- else if (IS_C_CUT(chip_version))
- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "C_CUT_");
- else if (IS_D_CUT(chip_version))
- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "D_CUT_");
- else if (IS_E_CUT(chip_version))
- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "E_CUT_");
- else if (IS_I_CUT(chip_version))
- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "I_CUT_");
- else if (IS_J_CUT(chip_version))
- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "J_CUT_");
- else if (IS_K_CUT(chip_version))
- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "K_CUT_");
- else
- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt,
- "UNKNOWN_CUT(%d)_", chip_version.CUTVersion);
-
- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "1T1R_");
-
- cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "RomVer(%d)\n", chip_version.ROMVer);
-}
-
-
#define EEPROM_CHANNEL_PLAN_BY_HW_MASK 0x80
/*
diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
index e794fe3caf9d..95bc4e73f512 100644
--- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
+++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
@@ -852,8 +852,6 @@ static struct hal_version ReadChipVersion8723B(struct adapter *padapter)
pHalData->MultiFunc |= ((value32 & GPS_FUNC_EN) ? RT_MULTI_FUNC_GPS : 0);
pHalData->PolarityCtl = ((value32 & WL_HWPDN_SL) ? RT_POLARITY_HIGH_ACT : RT_POLARITY_LOW_ACT);
- dump_chip_info(ChipVersion);
-
pHalData->VersionID = ChipVersion;
return ChipVersion;
diff --git a/drivers/staging/rtl8723bs/include/hal_com.h b/drivers/staging/rtl8723bs/include/hal_com.h
index 483f0390addc..cf775585c8e2 100644
--- a/drivers/staging/rtl8723bs/include/hal_com.h
+++ b/drivers/staging/rtl8723bs/include/hal_com.h
@@ -92,8 +92,6 @@ enum rt_media_status {
u8 rtw_hal_data_init(struct adapter *padapter);
void rtw_hal_data_deinit(struct adapter *padapter);
-void dump_chip_info(struct hal_version ChipVersion);
-
u8 /* return the final channel plan decision */
hal_com_config_channel_plan(
struct adapter *padapter,
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: rtl8723bs: remove dump_chip_info() function
2026-04-21 5:15 [PATCH] staging: rtl8723bs: remove dump_chip_info() function Nikolay Kulikov
@ 2026-04-21 14:26 ` Luka Gejak
0 siblings, 0 replies; 2+ messages in thread
From: Luka Gejak @ 2026-04-21 14:26 UTC (permalink / raw)
To: Nikolay Kulikov, Greg Kroah-Hartman; +Cc: linux-staging
On Tue Apr 21, 2026 at 7:15 AM CEST, Nikolay Kulikov wrote:
> The dump_chip_info() function formats chip version information into a
> local 128-byte buffer using the scnprintf(). This buffer was previously
> passed to the DBG_871X macro.
> Commit 968b15adb0ea ("staging: rtl8723bs: remove all DBG_871X logs")
> removed the macro, leaving the buffer formatted but never used or output
> anywhere.
>
> dump_chip_info() is now useless, so remove it and its call from
> ReadChipVersion8723B().
>
> Signed-off-by: Nikolay Kulikov <nikolayof23@gmail.com>
> ---
> drivers/staging/rtl8723bs/hal/hal_com.c | 42 -------------------
> .../staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 -
> drivers/staging/rtl8723bs/include/hal_com.h | 2 -
> 3 files changed, 46 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c
> index 728a2171fbcb..0cafebd7b0c9 100644
> --- a/drivers/staging/rtl8723bs/hal/hal_com.c
> +++ b/drivers/staging/rtl8723bs/hal/hal_com.c
> @@ -30,48 +30,6 @@ void rtw_hal_data_deinit(struct adapter *padapter)
> }
> }
>
> -
> -void dump_chip_info(struct hal_version chip_version)
> -{
> - char buf[128];
> - size_t cnt = 0;
> -
> - cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "Chip Version Info: CHIP_8723B_%s_",
> - IS_NORMAL_CHIP(chip_version) ? "Normal_Chip" : "Test_Chip");
> -
> - if (IS_CHIP_VENDOR_TSMC(chip_version))
> - cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "TSMC_");
> - else if (IS_CHIP_VENDOR_UMC(chip_version))
> - cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "UMC_");
> - else if (IS_CHIP_VENDOR_SMIC(chip_version))
> - cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "SMIC_");
> -
> - if (IS_A_CUT(chip_version))
> - cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "A_CUT_");
> - else if (IS_B_CUT(chip_version))
> - cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "B_CUT_");
> - else if (IS_C_CUT(chip_version))
> - cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "C_CUT_");
> - else if (IS_D_CUT(chip_version))
> - cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "D_CUT_");
> - else if (IS_E_CUT(chip_version))
> - cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "E_CUT_");
> - else if (IS_I_CUT(chip_version))
> - cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "I_CUT_");
> - else if (IS_J_CUT(chip_version))
> - cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "J_CUT_");
> - else if (IS_K_CUT(chip_version))
> - cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "K_CUT_");
> - else
> - cnt += scnprintf(buf + cnt, sizeof(buf) - cnt,
> - "UNKNOWN_CUT(%d)_", chip_version.CUTVersion);
> -
> - cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "1T1R_");
> -
> - cnt += scnprintf(buf + cnt, sizeof(buf) - cnt, "RomVer(%d)\n", chip_version.ROMVer);
> -}
> -
> -
> #define EEPROM_CHANNEL_PLAN_BY_HW_MASK 0x80
>
> /*
> diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> index e794fe3caf9d..95bc4e73f512 100644
> --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c
> @@ -852,8 +852,6 @@ static struct hal_version ReadChipVersion8723B(struct adapter *padapter)
> pHalData->MultiFunc |= ((value32 & GPS_FUNC_EN) ? RT_MULTI_FUNC_GPS : 0);
> pHalData->PolarityCtl = ((value32 & WL_HWPDN_SL) ? RT_POLARITY_HIGH_ACT : RT_POLARITY_LOW_ACT);
>
> - dump_chip_info(ChipVersion);
> -
> pHalData->VersionID = ChipVersion;
>
> return ChipVersion;
> diff --git a/drivers/staging/rtl8723bs/include/hal_com.h b/drivers/staging/rtl8723bs/include/hal_com.h
> index 483f0390addc..cf775585c8e2 100644
> --- a/drivers/staging/rtl8723bs/include/hal_com.h
> +++ b/drivers/staging/rtl8723bs/include/hal_com.h
> @@ -92,8 +92,6 @@ enum rt_media_status {
> u8 rtw_hal_data_init(struct adapter *padapter);
> void rtw_hal_data_deinit(struct adapter *padapter);
>
> -void dump_chip_info(struct hal_version ChipVersion);
> -
> u8 /* return the final channel plan decision */
> hal_com_config_channel_plan(
> struct adapter *padapter,
LGTM.
Reviewed-by: Luka Gejak <luka.gejak@linux.dev>
Best regards,
Luka Gejak
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-21 14:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-21 5:15 [PATCH] staging: rtl8723bs: remove dump_chip_info() function Nikolay Kulikov
2026-04-21 14:26 ` Luka Gejak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox