From patchwork Mon May 7 09:39:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenneth Lu X-Patchwork-Id: 10383773 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 9C16B60236 for ; Mon, 7 May 2018 09:39:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D84E28877 for ; Mon, 7 May 2018 09:39:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8208028899; Mon, 7 May 2018 09:39:57 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, 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 217FC28877 for ; Mon, 7 May 2018 09:39:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751489AbeEGJjz (ORCPT ); Mon, 7 May 2018 05:39:55 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:43781 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752036AbeEGJjw (ORCPT ); Mon, 7 May 2018 05:39:52 -0400 Received: by mail-pg0-f65.google.com with SMTP id k11-v6so18703826pgo.10 for ; Mon, 07 May 2018 02:39:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=/OgtqGD+cQIbIBxgiazTppMME11rWsnQ7ODqB6CDf78=; b=Lc9w0wDL2PJWkjv48qKVCMJU2SuMAQdVJAnQzGWZxy7bnDI56YNdc+/cS2a2EC4CO0 0Ujztyxq/bn5IfLMSjYqGGobrPMpEKmkd4bydAvT3/v2i1EhrL8m0no+I+m16BtKevVP XRAVVFyeLn/bBUXIaDr517ATzZOFn6eeCO3eVYGhqXHP2Ez6Zga1d7lwZ1LkFPXdWOmF AS5DIrOIEKxsFKVXdtlAgmCDs2BxLefIzBikbH9KScYxJBxc/+5Y2t/fx21Qy174OzX2 TAKuajhZhVqOP4WWat1aWnNcxsD5UzkD+2lJF2plRTWNfotAteWttbtFyIQxEt1Hal3C SmkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=/OgtqGD+cQIbIBxgiazTppMME11rWsnQ7ODqB6CDf78=; b=GTc8UhVkgfee4a8452ULPYSUmFwzMcI7Xc872Dm6W9aZxnTQtFykor0i4Lh0SaGibv Ml4FXLMIPr2BU3OVKZd1L+YRwDX/TGeFWG4Mn67UXdo2VRGJ+4RpLvucVBhAyXL8kji4 Bo+0jArh3RTod9aXX0mvdXHks48uJDMoyIVpgB5HxiTFHXWaOWyy9zdT/83iMm6N4XJ0 fG4aeTqUFvjxCb5EYkRc3/giB+Vj4taMrgwIlNqqmOq7CC8xVdzv1y2x1vwBMGiDDRdm CDdCfwj6NIdvIGbQu13C9F0IlawPxFHTlW8UalHFaT0faXnPbSFongTB2rYXZucThphx G6Dw== X-Gm-Message-State: ALQs6tCLeoQYx4KY08VvRGj/J/u5Vc0DDjGTqTF/71ytDH3S9dTiJTH1 Twlb8Wqevb3kP0S6nAC7MWrUYn9ArSU= X-Google-Smtp-Source: AB8JxZokwq2zwt2U0KPk9HaBQu4sSG+1RfdMRWdsxdls5vdDHnTsE75U5VQ1iMfAtHAj7382dd1Zsw== X-Received: by 2002:a65:4bc4:: with SMTP id p4-v6mr15020831pgr.53.1525685991252; Mon, 07 May 2018 02:39:51 -0700 (PDT) Received: from blackstone (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id o123-v6sm35519842pga.76.2018.05.07.02.39.50 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 May 2018 02:39:50 -0700 (PDT) Date: Mon, 7 May 2018 17:39:48 +0800 From: Kenneth Lu To: kvalo@qca.qualcomm.com Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH v2] ath10k: remove variables which set but not used Message-ID: <20180507093948.GA7905@blackstone> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) 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 Variable buf_len and num_vdev_stats are bging assigned but never read. These are redundant and can be remove. Signed-off-by: Kenneth Lu --- Changes in v2: Fixed compile failed in function 'ath10k_wmi_10_4_op_pull_fw_stats' error: 'num_vdev_stats' undeclared --- drivers/net/wireless/ath/ath10k/wmi.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index bb8e9e2..46fb96e 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -2318,7 +2318,6 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) u32 phy_mode; u32 snr; u32 rate; - u32 buf_len; u16 fc; int ret; @@ -2330,7 +2329,6 @@ int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb) } channel = __le32_to_cpu(arg.channel); - buf_len = __le32_to_cpu(arg.buf_len); rx_status = __le32_to_cpu(arg.status); snr = __le32_to_cpu(arg.snr); phy_mode = __le32_to_cpu(arg.phy_mode); @@ -2740,14 +2738,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++) { @@ -2795,14 +2792,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++) { @@ -2856,7 +2852,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; @@ -2865,7 +2860,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++) { @@ -2935,7 +2929,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; @@ -2944,7 +2937,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++) {