Re: [PATCH v2] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c

From: Ahmet Sezgin Duran

Date: Fri May 22 2026 - 01:30:20 EST


On 5/22/26 8:04 AM, Diego Fernando Mancera Gómez wrote:
Refactored redundant if-else blocks to a cleaner else-if structure in
odm_HWConfig.c and fixed indentation to use tabs as required by the
kernel coding style.

Signed-off-by: Diego Fernando Mancera Gómez <diegomancera.dev@xxxxxxxxx>
---
drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
index c88d669cb086..2e47734a0ae9 100644
--- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
@@ -228,18 +228,11 @@ static void odm_rx_phy_status_parsing(struct dm_odm_t *dm_odm,
odm_parsing_cfo(dm_odm, pkt_info, phy_sta_rpt->path_cfotail);
}
- /*
- * UI BSS List signal strength(in percentage), make it good
- * looking, from 0~100.
- * It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp().
- */
- if (is_cck_rate) {
+ if (is_cck_rate)
phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, pwdb_all));
- } else {
- if (rf_rx_num != 0) {
- phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
- }
- }
+ else if (rf_rx_num != 0)
+ phy_info->signal_strength = (u8)(odm_signal_scale_mapping(dm_odm, total_rssi /= rf_rx_num));
+
}
static void odm_Process_RSSIForDM(
@@ -437,4 +430,3 @@ enum hal_status ODM_ConfigBBWithHeaderFile(
return HAL_STATUS_SUCCESS;
}
-

You need to add list of changes in your commit, as it's V2 right now.

- /*
- * UI BSS List signal strength(in percentage), make it good
- * looking, from 0~100.
- * It is assigned to the BSS List in GetValueFromBeaconOrProbeRsp().
- */
- if (is_cck_rate) {

Why remove comments? Any reasoning?
static void odm_Process_RSSIForDM(
@@ -437,4 +430,3 @@ enum hal_status ODM_ConfigBBWithHeaderFile(
return HAL_STATUS_SUCCESS;
}

You also removed a blank line, it's not related to your actual changes. It's usually advised to do one type of change in a single commit.

Regards,
Ahmet Sezgin Duran