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

Diego Fernando Mancera Gómez posted 1 patch 2 days, 13 hours ago
drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
[PATCH v3] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c
Posted by Diego Fernando Mancera Gómez 2 days, 13 hours ago
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@gmail.com>
---
v3: Restored accidentally removed comments and blank line.
v2: Added commit body description and Signed-off-by tag.
v1: Initial cleanup of if-else logic.

 drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
index c88d669cb086..abf3d96746b9 100644
--- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
+++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c
@@ -227,19 +227,16 @@ 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(
-- 
2.43.0

Re: [PATCH v3] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c
Posted by Dan Carpenter 2 days, 13 hours ago
On Thu, May 21, 2026 at 11:46:24PM -0600, 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@gmail.com>
> ---

Please slow down.  Wait a day between resends.

regards,
dan carpenter