[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250828094717.599527-1-liaoyuanhong@vivo.com>
Date: Thu, 28 Aug 2025 17:47:17 +0800
From: Liao Yuanhong <liaoyuanhong@...o.com>
To: Ping-Ke Shih <pkshih@...ltek.com>,
linux-wireless@...r.kernel.org (open list:REALTEK WIRELESS DRIVER (rtw89)),
linux-kernel@...r.kernel.org (open list)
Cc: Liao Yuanhong <liaoyuanhong@...o.com>
Subject: [PATCH rtw-next v2] wifi: rtw89: 8852bt: Remove redundant off_reverse variables
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@...o.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
Powered by blists - more mailing lists