* [PATCH rtw-next v2] wifi: rtw89: 8852bt: Remove redundant off_reverse variables
@ 2025-08-28 9:47 Liao Yuanhong
2025-09-01 3:45 ` Ping-Ke Shih
0 siblings, 1 reply; 2+ messages in thread
From: Liao Yuanhong @ 2025-08-28 9:47 UTC (permalink / raw)
To: Ping-Ke Shih, open list:REALTEK WIRELESS DRIVER (rtw89),
open list
Cc: Liao Yuanhong
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>
---
Changes in v2:
- Modified after applying the pre-patch.
- Use '&&' instead of '&' to suppress compiler warnings.
---
drivers/net/wireless/realtek/rtw89/rtw8852bt_rfk.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852bt_rfk.c b/drivers/net/wireless/realtek/rtw89/rtw8852bt_rfk.c
index 164ee0fde03b..f22da30e4208 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8852bt_rfk.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8852bt_rfk.c
@@ -1799,19 +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;
- off_reverse = !off;
-
- val = dpk->is_dpk_enable & off_reverse & dpk->bp[path][kidx].path_ok;
-
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH rtw-next v2] wifi: rtw89: 8852bt: Remove redundant off_reverse variables
2025-08-28 9:47 [PATCH rtw-next v2] wifi: rtw89: 8852bt: Remove redundant off_reverse variables Liao Yuanhong
@ 2025-09-01 3:45 ` Ping-Ke Shih
0 siblings, 0 replies; 2+ messages in thread
From: Ping-Ke Shih @ 2025-09-01 3:45 UTC (permalink / raw)
To: Liao Yuanhong, Ping-Ke Shih,
open list:REALTEK WIRELESS DRIVER (rtw89), open list
Cc: Liao Yuanhong
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>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
35ded83be0d4 wifi: rtw89: 8852bt: Remove redundant off_reverse variables
---
https://github.com/pkshih/rtw.git
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-01 3:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-28 9:47 [PATCH rtw-next v2] wifi: rtw89: 8852bt: Remove redundant off_reverse variables Liao Yuanhong
2025-09-01 3:45 ` Ping-Ke Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).