Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1496084rwd; Wed, 7 Jun 2023 17:47:56 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Y/qlPDQB3buCwDTGlKQfB+aMUOtjBXhAG+v2WCb4h7pWdgKyTusL43Q+g2I+TyfyNV1y+ X-Received: by 2002:a17:90b:4f8a:b0:256:5ad8:86d7 with SMTP id qe10-20020a17090b4f8a00b002565ad886d7mr6417916pjb.2.1686185275939; Wed, 07 Jun 2023 17:47:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686185275; cv=none; d=google.com; s=arc-20160816; b=s4D7PRFRcgWM/5IZTlvpN5rC3pW/i6f0lD35USz8dA3Lb12tgRz7XcRlgRNLxT2sFY NTe/1z9w8oJ83H+Dl1EXJyYM5llQatz9EY4JZj4GCP4PclvFHme1XVw2m2ffcL47Njao qhjhW+bKqQWBvOt2+e1ioOpq5rnbTh02Fq3Q39ZHZ4nqfNzrSeJVU0RPhWuTFdmGj9Jn iaT/D0yxMsxmw2vK1eKaptcwywiGmODg/hge8gNlNsi/n14uyC8PviO6+lz0wPX1+/t8 WsqY0ED4Cb6ODFv22kgSRT71p0GccvjyoL77V2hqEVRZ65EuUR+xGGlwFzJt1OybxXRj szDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=sEpANo3l7gVpS+iYIbfAVYVvwAY8/gtqaJZbV5PfMIg=; b=MjI3zUHutw8x6RG0rlOaJh0ZIfxmfM7wX9XBthEsLhUb7nd/S08Ize9GhrE9hlWecP UdkU1A/PP+Q4+1TVkosesSmL+9Ao5xYG9i1hf8pSpB+V7M0vCLpMlxUDFcMZAcV7JpbM Tf+kE3T25LdgauI+C4kYOMNu0T/trVmLgyWdJUkxyAiRtjTzLWntBxdRl9Ft1Q3m2kSX HvXVqI+6lR5JbEEEruCCprSkety1LZwJebjl8ZyuSRBhi3yOytoYxSipWS1PdMV+PHXG Z4Wurt46u00llr4GxkB5n72MdmiTy2IqVo1SNZedCo+TtHa9hj40AmQpuqdi3zlPQYJu T3CA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id om2-20020a17090b3a8200b00252b824d13esi196996pjb.30.2023.06.07.17.47.48; Wed, 07 Jun 2023 17:47:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232040AbjFHAkm convert rfc822-to-8bit (ORCPT + 62 others); Wed, 7 Jun 2023 20:40:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229589AbjFHAkk (ORCPT ); Wed, 7 Jun 2023 20:40:40 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B33AE213C for ; Wed, 7 Jun 2023 17:40:39 -0700 (PDT) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 3580eFUC1022217, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 3580eFUC1022217 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK); Thu, 8 Jun 2023 08:40:15 +0800 Received: from RTEXDAG01.realtek.com.tw (172.21.6.100) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.32; Thu, 8 Jun 2023 08:40:31 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG01.realtek.com.tw (172.21.6.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Thu, 8 Jun 2023 08:40:31 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d]) by RTEXMBS04.realtek.com.tw ([fe80::e138:e7f1:4709:ff4d%5]) with mapi id 15.01.2375.007; Thu, 8 Jun 2023 08:40:31 +0800 From: Ping-Ke Shih To: Dmitry Antipov CC: Kalle Valo , "linux-wireless@vger.kernel.org" Subject: RE: [PATCH 2/2] wifi: rtw89: cleanup rtw89_iqk_info and related code Thread-Topic: [PATCH 2/2] wifi: rtw89: cleanup rtw89_iqk_info and related code Thread-Index: AQHZmICRpaKuGIBk3keApvrDwZUUPK+AEhMA Date: Thu, 8 Jun 2023 00:40:30 +0000 Message-ID: <4940e73006ec49c5adf76200c35d7704@realtek.com> References: <20230606083354.375287-1-dmantipov@yandex.ru> <20230606140806.606352-1-dmantipov@yandex.ru> <20230606140806.606352-2-dmantipov@yandex.ru> In-Reply-To: <20230606140806.606352-2-dmantipov@yandex.ru> Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.69.188] x-kse-serverinfo: RTEXDAG01.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-ServerInfo: RTEXH36505.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: Dmitry Antipov > Sent: Tuesday, June 6, 2023 10:08 PM > To: Ping-Ke Shih > Cc: Kalle Valo ; linux-wireless@vger.kernel.org; Dmitry Antipov > 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 > --- > 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, [...]