* [PATCH v3] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c
@ 2026-05-22 5:46 Diego Fernando Mancera Gómez
2026-05-22 5:48 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Diego Fernando Mancera Gómez @ 2026-05-22 5:46 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>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c
2026-05-22 5:46 [PATCH v3] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c Diego Fernando Mancera Gómez
@ 2026-05-22 5:48 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2026-05-22 5:48 UTC (permalink / raw)
To: Diego Fernando Mancera Gómez
Cc: gregkh, linux-staging, m.steinmoetzger, guojy.bj, straube.linux,
linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-22 5:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-22 5:46 [PATCH v3] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c Diego Fernando Mancera Gómez
2026-05-22 5:48 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox