> -----Original Message----- > From: Dmitry Antipov <dmantipov@xxxxxxxxx> > Sent: Tuesday, June 6, 2023 10:08 PM > To: Ping-Ke Shih <pkshih@xxxxxxxxxxx> > Cc: Kalle Valo <kvalo@xxxxxxxxxx>; linux-wireless@xxxxxxxxxxxxxxx; Dmitry Antipov <dmantipov@xxxxxxxxx> > Subject: [PATCH 2/2] wifi: rtw89: cleanup rtw89_iqk_info and related code > > Drop useless '_iqk_track()' and 'rtw8852a_iqk_track()' (they > just change 'thermal_rek_en' field which is set but unused > and so removed as well) functions, set but unused 'kcount' > field of 'struct rtw89_iqk_info', convert 'thermal' to local > variables where appropriate (it doesn't need to have longer > storage duration because it is actually used for debugging > purposes only), fix typos. > > Signed-off-by: Dmitry Antipov <dmantipov@xxxxxxxxx> > --- > drivers/net/wireless/realtek/rtw89/core.h | 3 -- > drivers/net/wireless/realtek/rtw89/rtw8852a.c | 1 - > .../net/wireless/realtek/rtw89/rtw8852a_rfk.c | 34 +------------------ > .../net/wireless/realtek/rtw89/rtw8852a_rfk.h | 1 - > .../net/wireless/realtek/rtw89/rtw8852b_rfk.c | 8 +---- > .../net/wireless/realtek/rtw89/rtw8852c_rfk.c | 9 ++--- > 6 files changed, 4 insertions(+), 52 deletions(-) > [...] > diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c > b/drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c > index cd6c39b7f802..afb7eba3dc44 100644 > --- a/drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c > +++ b/drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c > @@ -1284,11 +1284,8 @@ static void _iqk_info_iqk(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx, > u32 tmp = 0x0; > bool flag = 0x0; > > - iqk_info->thermal[path] = > - ewma_thermal_read(&rtwdev->phystat.avg_thermal[path]); > - iqk_info->thermal_rek_en = false; > rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%d_thermal = %d\n", path, > - iqk_info->thermal[path]); > + (u8)ewma_thermal_read(&rtwdev->phystat.avg_thermal[path])); nit: no need casting (u8) > rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%d_LOK_COR_fail= %d\n", path, > iqk_info->lok_cor_fail[0][path]); > rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%d_LOK_FIN_fail= %d\n", path, [...] > diff --git a/drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c > b/drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c > index 2c0bc3a4ab3b..d8c8688faee4 100644 > --- a/drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c > +++ b/drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c > @@ -1261,11 +1261,8 @@ static void _iqk_info_iqk(struct rtw89_dev *rtwdev, enum rtw89_phy_idx phy_idx, > u32 tmp; > bool flag; > > - iqk_info->thermal[path] = > - ewma_thermal_read(&rtwdev->phystat.avg_thermal[path]); > - iqk_info->thermal_rek_en = false; > rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%d_thermal = %d\n", path, > - iqk_info->thermal[path]); > + (u8)ewma_thermal_read(&rtwdev->phystat.avg_thermal[path])); nit: no need casting (u8) > rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%d_LOK_COR_fail= %d\n", path, > iqk_info->lok_cor_fail[0][path]); > rtw89_debug(rtwdev, RTW89_DBG_RFK, "[IQK]S%d_LOK_FIN_fail= %d\n", path, [...]