Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH v2] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c
@ 2026-05-22  5:04 Diego Fernando Mancera Gómez
  2026-05-22  5:22 ` Ahmet Sezgin Duran
  2026-05-22  5:35 ` Dan Carpenter
  0 siblings, 2 replies; 3+ messages in thread
From: Diego Fernando Mancera Gómez @ 2026-05-22  5:04 UTC (permalink / raw)
  To: gregkh, linux-staging
  Cc: m.steinmoetzger, guojy.bj, straube.linux, error27, linux-kernel,
	Diego Fernando Mancera Gómez

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>
---
 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;
 }
-
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-22  5:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-22  5:04 [PATCH v2] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c Diego Fernando Mancera Gómez
2026-05-22  5:22 ` Ahmet Sezgin Duran
2026-05-22  5:35 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox