From patchwork Thu Nov 24 08:01:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kirtika Ruchandani X-Patchwork-Id: 9444935 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 394EC6071C for ; Thu, 24 Nov 2016 08:04:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D37027165 for ; Thu, 24 Nov 2016 08:04:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FBE4271BC; Thu, 24 Nov 2016 08:04:20 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76247212EE for ; Thu, 24 Nov 2016 08:04:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756831AbcKXIER (ORCPT ); Thu, 24 Nov 2016 03:04:17 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36491 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755936AbcKXIEP (ORCPT ); Thu, 24 Nov 2016 03:04:15 -0500 Received: by mail-pg0-f68.google.com with SMTP id x23so2841387pgx.3; Thu, 24 Nov 2016 00:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Lj5GTprONAo1Oij6Dk7XACp2FbvmyEJ7aB90F13bIFo=; b=pJhHqiyBudATGmrrvm+AtHl7NpmP5gF8YmDWUtTn7c2ZY32LDL05NiEADpWCHZD7+r V8rZhlm9EimuYm1OPKc9URHhUXu3NPuN//DDZJd+1Hm+7zsrHfRi36/D21SBuBdiO3zz 3OHXq7FcG31dkB69GeZMNqCkU3JHAXP/J00elqtJKT2siVmS1TG1qOuJEMU7pvVAdEpW e3eP9/EDC0bGodabbGl+2JuH7U2J+k+OHXoEMNgqerbA1DNODB2nkUYZrGr3Sv+/RFr6 wc5++vmcYNpI06UZZt0/lXiWKQWUbQaRrLKTGVd94oRk574jsHosPz6GykOlQ0JPGPzw g3mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=Lj5GTprONAo1Oij6Dk7XACp2FbvmyEJ7aB90F13bIFo=; b=E2L1dbucbbO/DmlNOLhQlKHHOYAlL+gTJhjuQPm4IEPtNE0ydvZtNx3LyWZ3OHW0bh E4+ZgqW0vi9YFbRQLiWblrv2RaJKW/YT4YvhtvHJ9NTxDNJz+mI9wbpJ2IhE2tUWS++M EV31j5w8rsqyuuwBVa2YDa6BvQzLyMMcYgNP7mz8tTlswTZuiKlPeGwH4WJmp+b5e2Pg Uo8qgaTd7mGSRCBEXihlF3HWvCYXg8XuWswQ4KpYC5+/NO4siCSju1ETKW5FFC7ZBpsv Iuv3+SnznHPb94rHk+Z6e+cy7eVXQa+rdhE4PqctnEds420wreerccuAoBU9GwcHgE/F PUgg== X-Gm-Message-State: AKaTC02yYXKPMTA+I4Vbxo15x6TpFZFetMJRD64QOlpGtRdrvqE2BkczqxUlqdyGEtAfVg== X-Received: by 10.84.216.92 with SMTP id f28mr2563982plj.31.1479974506491; Thu, 24 Nov 2016 00:01:46 -0800 (PST) Received: from google.com ([2620:0:1000:1301:e80d:edf6:fd55:23d6]) by smtp.gmail.com with ESMTPSA id v77sm57852897pfa.85.2016.11.24.00.01.45 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 24 Nov 2016 00:01:45 -0800 (PST) From: Kirtika Ruchandani X-Google-Original-From: Kirtika Ruchandani Date: Thu, 24 Nov 2016 00:01:41 -0800 To: Kalle Valo Cc: Arnd Bergmann , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, Raja Mani , Michal Kazior Subject: [PATCH 2/5] ath10k: Remove unused 'num_vdev_stats' variable Message-ID: <053542094d16965b971f1bc70dbbe9dff3c40ca1.1479974100.git.kirtika@chromium.org> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Several functions for wmi stats parsing define and set num_vdev_stats but do not use it. Compiling with W=1 gives the following warnings, fix them. drivers/net/wireless/ath/ath10k/wmi.c: In function ‘ath10k_wmi_main_op_pull_fw_stats’: drivers/net/wireless/ath/ath10k/wmi.c:2680:22: warning: variable ‘num_vdev_stats’ set but not used [-Wunused-but-set-variable] u32 num_pdev_stats, num_vdev_stats, num_peer_stats; ^ drivers/net/wireless/ath/ath10k/wmi.c: In function ‘ath10k_wmi_10x_op_pull_fw_stats’: drivers/net/wireless/ath/ath10k/wmi.c:2735:22: warning: variable ‘num_vdev_stats’ set but not used [-Wunused-but-set-variable] u32 num_pdev_stats, num_vdev_stats, num_peer_stats; ^ drivers/net/wireless/ath/ath10k/wmi.c: In function ‘ath10k_wmi_10_2_op_pull_fw_stats’: drivers/net/wireless/ath/ath10k/wmi.c:2796:6: warning: variable ‘num_vdev_stats’ set but not used [-Wunused-but-set-variable] u32 num_vdev_stats; ^ drivers/net/wireless/ath/ath10k/wmi.c: In function ‘ath10k_wmi_10_2_4_op_pull_fw_stats’: drivers/net/wireless/ath/ath10k/wmi.c:2875:6: warning: variable ‘num_vdev_stats’ set but not used [-Wunused-but-set-variable] u32 num_vdev_stats; ^ drivers/net/wireless/ath/ath10k/wmi.c: In function ‘ath10k_wmi_10_4_op_pull_fw_stats’: drivers/net/wireless/ath/ath10k/wmi.c:2963:6: warning: variable ‘num_vdev_stats’ set but not used [-Wunused-but-set-variable] u32 num_vdev_stats; ^ These are harmless warnings and are only being fixed to reduce the noise with W=1 in the kernel. Fixes: d15fb5200664 ("ath10k: split wmi stats parsing") Fixes: 20de2229c634 ("ath10k: fix 10.2 fw stats parsing") Cc: Michal Kazior Cc: Kalle Valo Signed-off-by: Kirtika Ruchandani --- drivers/net/wireless/ath/ath10k/wmi.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) -- 2.8.0.rc3.226.g39d4020 diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 1f28187..10ec5a5 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -2675,14 +2675,13 @@ static int ath10k_wmi_main_op_pull_fw_stats(struct ath10k *ar, struct ath10k_fw_stats *stats) { const struct wmi_stats_event *ev = (void *)skb->data; - u32 num_pdev_stats, num_vdev_stats, num_peer_stats; + u32 num_pdev_stats, num_peer_stats; int i; if (!skb_pull(skb, sizeof(*ev))) return -EPROTO; num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats); - num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats); num_peer_stats = __le32_to_cpu(ev->num_peer_stats); for (i = 0; i < num_pdev_stats; i++) { @@ -2730,14 +2729,13 @@ static int ath10k_wmi_10x_op_pull_fw_stats(struct ath10k *ar, struct ath10k_fw_stats *stats) { const struct wmi_stats_event *ev = (void *)skb->data; - u32 num_pdev_stats, num_vdev_stats, num_peer_stats; + u32 num_pdev_stats, num_peer_stats; int i; if (!skb_pull(skb, sizeof(*ev))) return -EPROTO; num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats); - num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats); num_peer_stats = __le32_to_cpu(ev->num_peer_stats); for (i = 0; i < num_pdev_stats; i++) { @@ -2791,7 +2789,6 @@ static int ath10k_wmi_10_2_op_pull_fw_stats(struct ath10k *ar, const struct wmi_10_2_stats_event *ev = (void *)skb->data; u32 num_pdev_stats; u32 num_pdev_ext_stats; - u32 num_vdev_stats; u32 num_peer_stats; int i; @@ -2800,7 +2797,6 @@ static int ath10k_wmi_10_2_op_pull_fw_stats(struct ath10k *ar, num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats); num_pdev_ext_stats = __le32_to_cpu(ev->num_pdev_ext_stats); - num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats); num_peer_stats = __le32_to_cpu(ev->num_peer_stats); for (i = 0; i < num_pdev_stats; i++) { @@ -2870,7 +2866,6 @@ static int ath10k_wmi_10_2_4_op_pull_fw_stats(struct ath10k *ar, const struct wmi_10_2_stats_event *ev = (void *)skb->data; u32 num_pdev_stats; u32 num_pdev_ext_stats; - u32 num_vdev_stats; u32 num_peer_stats; int i; @@ -2879,7 +2874,6 @@ static int ath10k_wmi_10_2_4_op_pull_fw_stats(struct ath10k *ar, num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats); num_pdev_ext_stats = __le32_to_cpu(ev->num_pdev_ext_stats); - num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats); num_peer_stats = __le32_to_cpu(ev->num_peer_stats); for (i = 0; i < num_pdev_stats; i++) { @@ -2958,7 +2952,6 @@ static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k *ar, const struct wmi_10_2_stats_event *ev = (void *)skb->data; u32 num_pdev_stats; u32 num_pdev_ext_stats; - u32 num_vdev_stats; u32 num_peer_stats; u32 num_bcnflt_stats; u32 stats_id; @@ -2969,7 +2962,6 @@ static int ath10k_wmi_10_4_op_pull_fw_stats(struct ath10k *ar, num_pdev_stats = __le32_to_cpu(ev->num_pdev_stats); num_pdev_ext_stats = __le32_to_cpu(ev->num_pdev_ext_stats); - num_vdev_stats = __le32_to_cpu(ev->num_vdev_stats); num_peer_stats = __le32_to_cpu(ev->num_peer_stats); num_bcnflt_stats = __le32_to_cpu(ev->num_bcnflt_stats); stats_id = __le32_to_cpu(ev->stats_id);