From patchwork Thu Nov 8 09:32:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10673843 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 07F7D15E9 for ; Thu, 8 Nov 2018 09:24:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA2AC2D3F0 for ; Thu, 8 Nov 2018 09:24:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDF762D409; Thu, 8 Nov 2018 09:24:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7601B2D3F0 for ; Thu, 8 Nov 2018 09:24:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=OPBZikvvPAVVvg3ADg8VzCRzBC6V7A+S1jFw5MxfZQM=; b=rcZ4O0SFGoz0+e 76zpOpasPiIZ0vtW7415AkzXNjzVnNh142UqrjWjyQmPsU61nYJqOAn1guVypRdbNozrwvO6IvcEy BpOp+d673MGl4BrtGBAVwc+cjvW8P99NT5smnc83KDPxPICHaUFccXJWzmv0762gbCdugtakHf2v8 p4YFwsnr5EzPVcQk4UBPQLSh2KZtFHOao1/hTdWBor0R9v833x5j3XUz7GnA5oT+NIW74V/pDJQks MSZMBSfAF0+Y+QYeK095GI9sjnz2INc1cInQ7PKFp6FzX8Zo65mN9O4b948DUjULfoNZLVwipX5AS Vi8SRX0e9Ygus4JWNJ1Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKgXz-0002vP-OY; Thu, 08 Nov 2018 09:24:19 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKgXz-0002vF-4n for ath10k@bombadil.infradead.org; Thu, 08 Nov 2018 09:24:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=MIME-Version:Content-Transfer-Encoding: Content-Type:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=mIl4kDHlSHqhu/XLUeEF2qBOzIR+PxM6+lWhcs+O3rc=; b=hYIMghEUheAv0pDuJeAS6cUx6c 4TYs9hAduLKhQbceEnEKnA44AL2oQQt86UXjzD2DzZQZ58G0dI6Z0uXWoCpFx64xKhq04XvNC1XxA VoJre6nK9oT1RdnMjCScBHtVngtU7ecfzAZvSvjutFzdEJcuBONDc9nZvsbRQ49Rr7uRdAp+SToP6 H0wJFS1rsTvLXxBYTpFQG9d6LQqUCprdTtco9namjlWXr5gTGz02jxtShe4JG+mJrtwUBYuGOSOx5 44ZP61oAuZ7VniCbERwUfLc+z6pGfsanGsdeKzFRxC96n9dAWqpXFEl95Ev5JHE4PQyv4SY1vBn96 FWmo70jw==; Received: from szxga06-in.huawei.com ([45.249.212.32] helo=huawei.com) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKgXq-0008PC-Th for ath10k@lists.infradead.org; Thu, 08 Nov 2018 09:24:17 +0000 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 636091515897C; Thu, 8 Nov 2018 17:23:15 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.408.0; Thu, 8 Nov 2018 17:23:07 +0800 From: YueHaibing To: Kalle Valo Subject: [PATCH] ath10k: remove set but not used variable 'num_tdls_vifs' Date: Thu, 8 Nov 2018 09:32:50 +0000 Message-ID: <1541669570-110540-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181108_092416_411001_611283AC X-CRM114-Status: UNSURE ( 7.40 ) X-CRM114-Notice: Please train this message. X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org, YueHaibing , ath10k@lists.infradead.org, netdev@vger.kernel.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/wireless/ath/ath10k/mac.c: In function 'ath10k_sta_state': drivers/net/wireless/ath/ath10k/mac.c:6238:7: warning: variable 'num_tdls_vifs' set but not used [-Wunused-but-set-variable] 'num_tdls_vifs' not used any more after 9a993cc1ea95 ("ath10k: fix the logic of limiting tdls peer counts") Also, remove the single called function ath10k_mac_tdls_vifs_count and ath10k_mac_tdls_vifs_count_iter. Signed-off-by: YueHaibing --- drivers/net/wireless/ath/ath10k/mac.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index a1c2801..6006f7a 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -5754,30 +5754,6 @@ static int ath10k_mac_tdls_vif_stations_count(struct ieee80211_hw *hw, return data.num_tdls_stations; } -static void ath10k_mac_tdls_vifs_count_iter(void *data, u8 *mac, - struct ieee80211_vif *vif) -{ - struct ath10k_vif *arvif = (void *)vif->drv_priv; - int *num_tdls_vifs = data; - - if (vif->type != NL80211_IFTYPE_STATION) - return; - - if (ath10k_mac_tdls_vif_stations_count(arvif->ar->hw, vif) > 0) - (*num_tdls_vifs)++; -} - -static int ath10k_mac_tdls_vifs_count(struct ieee80211_hw *hw) -{ - int num_tdls_vifs = 0; - - ieee80211_iterate_active_interfaces_atomic(hw, - IEEE80211_IFACE_ITER_NORMAL, - ath10k_mac_tdls_vifs_count_iter, - &num_tdls_vifs); - return num_tdls_vifs; -} - static int ath10k_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_scan_request *hw_req) @@ -6285,7 +6261,6 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, */ enum wmi_peer_type peer_type = WMI_PEER_TYPE_DEFAULT; u32 num_tdls_stations; - u32 num_tdls_vifs; ath10k_dbg(ar, ATH10K_DBG_MAC, "mac vdev %d peer create %pM (new sta) sta %d / %d peer %d / %d\n", @@ -6301,7 +6276,6 @@ static int ath10k_sta_state(struct ieee80211_hw *hw, } num_tdls_stations = ath10k_mac_tdls_vif_stations_count(hw, vif); - num_tdls_vifs = ath10k_mac_tdls_vifs_count(hw); if (sta->tdls) { if (num_tdls_stations >= ar->max_num_tdls_vdevs) {