From: "Ethan Tidmore" <ethantidmore06@gmail.com>
To: "Luka Gejak" <luka.gejak@linux.dev>,
"Prithvi Tambewagh" <activprithvi@gmail.com>,
<gregkh@linuxfoundation.org>, <abrahamadekunle50@gmail.com>,
<b9788213@gmail.com>, <straube.linux@gmail.com>,
<ethantidmore06@gmail.com>, <andriy.shevchenko@linux.intel.com>,
<dan.carpenter@linaro.org>, <weibu@redadmin.org>,
<knavaneeth786@gmail.com>, <ignacio.pena87@gmail.com>,
<dharanitharan725@gmail.com>, <samasth.norway.ananda@oracle.com>,
<karanja99erick@gmail.com>, <s9430939@naver.com>,
<suunj1331@gmail.com>, <ysinghcin@gmail.com>
Cc: <linux-staging@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
<linux-kernel-mentees@lists.linux.dev>,
<skhan@linuxfoundation.org>, <david.hunter.linux@gmail.com>,
<khalid@kernel.org>
Subject: Re: [RFT PATCH v3 5/5] staging: rtl8723bs: remove duplicate rate checks in PHY_GetTxPowerIndexBase()
Date: Mon, 06 Apr 2026 15:47:39 -0500 [thread overview]
Message-ID: <DHMD7XTRZ3LY.2EP61834E44FS@gmail.com> (raw)
In-Reply-To: <B3F00249-F9E5-4077-B863-EC809A556296@linux.dev>
On Sun Apr 5, 2026 at 7:57 AM CDT, Luka Gejak wrote:
> On April 5, 2026 1:41:32 PM GMT+02:00, Prithvi Tambewagh <activprithvi@gmail.com> wrote:
>>The code previously checked (Rate >= MGN_MCS0 && Rate <= MGN_MCS7)
>>condition twice - once for the (BandWidth == CHANNEL_WIDTH_20) check and
>>once for the (BandWidth == CHANNEL_WIDTH_40) check. Fix if statement
>>formatting to move that if check as an outer if check to improve code
>>formatting.
>>
>>Signed-off-by: Prithvi Tambewagh <activprithvi@gmail.com>
>>---
>> drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 7 +++----
>> 1 file changed, 3 insertions(+), 4 deletions(-)
>>
>>diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
>>index 9e523491a008..efd1c76f2953 100644
>>--- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
>>+++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c
>>@@ -469,11 +469,10 @@ u8 PHY_GetTxPowerIndexBase(
>> if ((Rate >= MGN_6M && Rate <= MGN_54M) && !IS_CCK_RATE(Rate))
>> txPower += pHalData->OFDM_24G_Diff[RFPath][TX_1S];
>>
>>- if (BandWidth == CHANNEL_WIDTH_20) { /* BW20-1S, BW20-2S */
>>- if (MGN_MCS0 <= Rate && Rate <= MGN_MCS7)
>>+ if (Rate >= MGN_MCS0 && Rate <= MGN_MCS7) {
>>+ if (BandWidth == CHANNEL_WIDTH_20) /* BW20-1S, BW20-2S */
>> txPower += pHalData->BW20_24G_Diff[RFPath][TX_1S];
>>- } else if (BandWidth == CHANNEL_WIDTH_40) { /* BW40-1S, BW40-2S */
>>- if (MGN_MCS0 <= Rate && Rate <= MGN_MCS7)
>>+ else if (BandWidth == CHANNEL_WIDTH_40) /* BW40-1S, BW40-2S */
>> txPower += pHalData->BW40_24G_Diff[RFPath][TX_1S];
>> }
>>
>
> LGTM,
> Reviewed-by: Luka Gejak <luka.gejak@linux.dev>
Doesn't apply to staging-next too.
Thanks,
ET
next prev parent reply other threads:[~2026-04-06 20:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-05 11:41 [RFT PATCH v3 0/5] staging: rtl8723bs: Code cleanup in drivers/staging/rtl8723bs Prithvi Tambewagh
2026-04-05 11:41 ` [RFT PATCH v3 1/5] staging: rtl8723bs: move constant to right side of test in comparison Prithvi Tambewagh
2026-04-05 12:49 ` Luka Gejak
2026-04-05 12:51 ` Luka Gejak
2026-04-06 20:45 ` Ethan Tidmore
2026-04-07 4:34 ` Luka Gejak
2026-04-07 4:37 ` Luka Gejak
2026-04-05 11:41 ` [RFT PATCH v3 2/5] staging: rtl8723bs: remove empty if statement block Prithvi Tambewagh
2026-04-05 12:53 ` Luka Gejak
2026-04-05 11:41 ` [RFT PATCH v3 3/5] staging: rtl8723bs: simplify boolean return in IsFrameTypeCtrl() Prithvi Tambewagh
2026-04-05 12:54 ` Luka Gejak
2026-04-05 11:41 ` [RFT PATCH v3 4/5] staging: rtl8723bs: use read_poll_timeout_atomic in _is_fw_read_cmd_down Prithvi Tambewagh
2026-04-05 12:55 ` Luka Gejak
2026-04-05 11:41 ` [RFT PATCH v3 5/5] staging: rtl8723bs: remove duplicate rate checks in PHY_GetTxPowerIndexBase() Prithvi Tambewagh
2026-04-05 12:57 ` Luka Gejak
2026-04-06 20:47 ` Ethan Tidmore [this message]
2026-04-05 13:01 ` [RFT PATCH v3 0/5] staging: rtl8723bs: Code cleanup in drivers/staging/rtl8723bs Luka Gejak
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=DHMD7XTRZ3LY.2EP61834E44FS@gmail.com \
--to=ethantidmore06@gmail.com \
--cc=abrahamadekunle50@gmail.com \
--cc=activprithvi@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=b9788213@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=david.hunter.linux@gmail.com \
--cc=dharanitharan725@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=ignacio.pena87@gmail.com \
--cc=karanja99erick@gmail.com \
--cc=khalid@kernel.org \
--cc=knavaneeth786@gmail.com \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=luka.gejak@linux.dev \
--cc=s9430939@naver.com \
--cc=samasth.norway.ananda@oracle.com \
--cc=skhan@linuxfoundation.org \
--cc=straube.linux@gmail.com \
--cc=suunj1331@gmail.com \
--cc=weibu@redadmin.org \
--cc=ysinghcin@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox