Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp516032rdg; Tue, 10 Oct 2023 18:24:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGtv6U4DTokD1hyKf98Y9dylntkC3Dnk+80uO1DsimQ86tbNC8Q3zHNnV+Kyu/EpZtuXiBb X-Received: by 2002:a05:6808:159c:b0:3a8:512a:41b8 with SMTP id t28-20020a056808159c00b003a8512a41b8mr24114251oiw.21.1696987493709; Tue, 10 Oct 2023 18:24:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696987493; cv=none; d=google.com; s=arc-20160816; b=TTEbF8ddzNXxWUd/pDe8d+dKLP3Quz1ZX7XfTebNXddzdfBF6zz10i3mPqsngDBdz1 5xAlNR2H5nWhzSa84qLx9RF4p/svgxE+6vHkxIP9iUpWBNuzpTiDy91F7BP+Hh89d0D6 SbAeil5PY3KFeQ7FXPeU+TajjIhuxggeH9wub832Nq4wH9sxQ2+ki204E1G4Z/s+IV61 ySKXqDNI0eLILF9SeWK9DOnywXnlQnEffeSBbpqVkZ6iPSnSuf3eU5OLvNBzDzRt33xT nLG2NUeZRGnVXTkPS9GIjApXUVTyKwPUDpYRVgaL5WN4SKc2xlF24OlSJ2ekbLEjScwQ Rg3g== 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; bh=W8HFVUeYXqsLGr7WnjaGRot4LWC4WTgJDLCEuYorBSo=; fh=pZpLv3JBu7ewThcXtBU3x3uGUeTqUHmHtpmV6AvLzGM=; b=Pv5iKBcxvs04pVtkxF/XI57hYiiQ/RJwOyrsXooUYbQTQlb3UVTF57anhKbq4ZcmEv 8SXQA7At2LYITHObNTuCN7Do7EPhRPSAmgbSYzxOgFTerirw4z+fpCLutwFNi8AM58ab 520R2hf5Qvzkkvz3ueg/FoRETAqZcWFiSsdtUKejXq6vS0rvmIk28HIYtlYocIpfMzUU QZtsBXNciKbEc3C2wtG1usuBoD3askqC3BBihPpFOC4TjqOaU5mLzjBgcuwafRi6DoLT qT6MMrOW50DzK3lX4bwcd+RFIYKVwiQ928hltivQqkwBnwJ5tq7Cwy6MtTJdliWya/kS nnSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id c5-20020a6566c5000000b005859e224617si13595598pgw.818.2023.10.10.18.24.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 18:24:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2E45680DAC6C; Tue, 10 Oct 2023 18:24:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344546AbjJKBYh convert rfc822-to-8bit (ORCPT + 52 others); Tue, 10 Oct 2023 21:24:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344484AbjJKBYg (ORCPT ); Tue, 10 Oct 2023 21:24:36 -0400 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9247092 for ; Tue, 10 Oct 2023 18:24:32 -0700 (PDT) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 39B1OLHp83255901, 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.92/5.92) with ESMTPS id 39B1OLHp83255901 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 11 Oct 2023 09:24:21 +0800 Received: from RTEXMBS05.realtek.com.tw (172.21.6.98) 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; Wed, 11 Oct 2023 09:24:22 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS05.realtek.com.tw (172.21.6.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 11 Oct 2023 09:24:21 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7]) by RTEXMBS04.realtek.com.tw ([fe80::40c2:6c24:2df4:e6c7%5]) with mapi id 15.01.2375.007; Wed, 11 Oct 2023 09:24:21 +0800 From: Ping-Ke Shih To: Dmitry Antipov CC: Kalle Valo , "linux-wireless@vger.kernel.org" Subject: RE: [PATCH] wifi: rtlwifi: use convenient list_count_nodes() Thread-Topic: [PATCH] wifi: rtlwifi: use convenient list_count_nodes() Thread-Index: AQHZ+3pZXFo0BoARxE+CsxYJLndNNrBDy8/Q Date: Wed, 11 Oct 2023 01:24:21 +0000 Message-ID: References: <20231010130353.30461-1-dmantipov@yandex.ru> In-Reply-To: <20231010130353.30461-1-dmantipov@yandex.ru> Accept-Language: en-US, zh-TW Content-Language: zh-TW x-originating-ip: [172.21.69.25] x-kse-serverinfo: RTEXMBS05.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=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 10 Oct 2023 18:24:48 -0700 (PDT) X-Spam-Level: ** > -----Original Message----- > From: Dmitry Antipov > Sent: Tuesday, October 10, 2023 9:04 PM > To: Ping-Ke Shih > Cc: Kalle Valo ; linux-wireless@vger.kernel.org; Dmitry Antipov > Subject: [PATCH] wifi: rtlwifi: use convenient list_count_nodes() > > Simplify 'rtl92ee_dm_common_info_self_update()', > 'rtl8723be_dm_common_info_self_update()', and > 'rtl8821ae_dm_common_info_self_update()' by using > 'list_count_nodes()'. Compile tested only. > > Signed-off-by: Dmitry Antipov > --- > drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c | 5 +---- > drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c | 5 +---- > drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c | 4 +--- > 3 files changed, 3 insertions(+), 11 deletions(-) > > diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c > b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c > index 997ff115b9ab..efd22b75c05f 100644 > --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c > +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ee/dm.c > @@ -936,7 +936,6 @@ void rtl92ee_dm_init(struct ieee80211_hw *hw) > static void rtl92ee_dm_common_info_self_update(struct ieee80211_hw *hw) > { > struct rtl_priv *rtlpriv = rtl_priv(hw); > - struct rtl_sta_info *drv_priv; > u8 cnt = 0; After 'cnt = list_count_nodes(...)', this initializer is not necessary. As well as other two cases.