From: "Diego Fernando Mancera Gómez" <diegomancera.dev@gmail.com>
To: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev
Cc: m.steinmoetzger@gmail.com, guojy.bj@gmail.com,
straube.linux@gmail.com, error27@gmail.com,
linux-kernel@vger.kernel.org,
"Diego Fernando Mancera Gómez" <diegomancera.dev@gmail.com>
Subject: [PATCH v2] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c
Date: Thu, 21 May 2026 23:04:29 -0600 [thread overview]
Message-ID: <20260522050429.161273-1-diegomancera.dev@gmail.com> (raw)
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
next reply other threads:[~2026-05-22 5:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-22 5:04 Diego Fernando Mancera Gómez [this message]
2026-05-22 5:22 ` [PATCH v2] staging: rtl8723bs: clean up if-else logic in odm_HWConfig.c Ahmet Sezgin Duran
2026-05-22 5:35 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260522050429.161273-1-diegomancera.dev@gmail.com \
--to=diegomancera.dev@gmail.com \
--cc=error27@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=guojy.bj@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=m.steinmoetzger@gmail.com \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.