From: Ping-Ke Shih <pkshih@realtek.com>
To: Liao Yuanhong <liaoyuanhong@vivo.com>,
"open list:REALTEK WIRELESS DRIVER (rtw89)"
<linux-wireless@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] wifi: rtw89: 8852bt: Remove redundant off_reverse variables
Date: Wed, 27 Aug 2025 05:26:52 +0000 [thread overview]
Message-ID: <07dd869670914c659c98eae0315c704a@realtek.com> (raw)
In-Reply-To: <20250827040643.208541-1-liaoyuanhong@vivo.com>
Liao Yuanhong <liaoyuanhong@vivo.com> wrote:
> The variable off_reverse and its related code are completely redundant in
> the function. Remove them to clean the code.
>
> Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
> ---
> drivers/net/wireless/realtek/rtw89/rtw8852bt_rfk.c | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852bt_rfk.c
> b/drivers/net/wireless/realtek/rtw89/rtw8852bt_rfk.c
> index d0e299803225..f23754a5c7b9 100644
> --- a/drivers/net/wireless/realtek/rtw89/rtw8852bt_rfk.c
> +++ b/drivers/net/wireless/realtek/rtw89/rtw8852bt_rfk.c
> @@ -1799,22 +1799,14 @@ static void _dpk_onoff(struct rtw89_dev *rtwdev, enum rtw89_rf_path path, bool o
> {
> struct rtw89_dpk_info *dpk = &rtwdev->dpk;
> u8 val, kidx = dpk->cur_idx[path];
> - bool off_reverse;
>
> - val = dpk->is_dpk_enable && !off && dpk->bp[path][kidx].path_ok;
> -
> - if (off)
> - off_reverse = false;
> - else
> - off_reverse = true;
> -
> - val = dpk->is_dpk_enable & off_reverse & dpk->bp[path][kidx].path_ok;
> + val = dpk->is_dpk_enable & !off & dpk->bp[path][kidx].path_ok;
The previous patch has merged. Please re-spin this patch on top of rtw-next [1].
The subject should be "[PATCH rtw-next]", so NIPA can do correct tree selection.
[1] https://github.com/pkshih/rtw.git rtw-next
>
> rtw89_phy_write32_mask(rtwdev, R_DPD_CH0A + (path << 8) + (kidx << 2),
> BIT(24), val);
>
> rtw89_debug(rtwdev, RTW89_DBG_RFK, "[DPK] S%d[%d] DPK %s !!!\n", path,
> - kidx, str_enable_disable(dpk->is_dpk_enable & off_reverse));
> + kidx, str_enable_disable(dpk->is_dpk_enable & !off));
> }
>
> static void _dpk_one_shot(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy,
> --
> 2.34.1
next prev parent reply other threads:[~2025-08-27 5:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 4:06 Liao Yuanhong
2025-08-27 5:26 ` Ping-Ke Shih [this message]
2025-08-27 6:02 ` Ping-Ke Shih
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=07dd869670914c659c98eae0315c704a@realtek.com \
--to=pkshih@realtek.com \
--cc=liaoyuanhong@vivo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/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
all inboxes | Powered by JetHome®