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: 10383779 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 0A64160236 for ; Mon, 7 May 2018 09:40:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE784288B9 for ; Mon, 7 May 2018 09:40:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E332D289B2; Mon, 7 May 2018 09:40:28 +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=-2.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI 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 698F3288C7 for ; Mon, 7 May 2018 09:40:28 +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:Subject:To:From :Date: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=up2HLoLu709hnT0asJBHNpnrwxiWzsnPkFEjeV8td6Q=; b=lO/4/DC9IOI4Pm rjcB5ga8DEiHrc5wJyQ1Oatjy0fyzwwWMTNnU/kf87XtvI110RPN28GhsMCTXfWxLivyDlDntV4nu gerAelGvmWYjk6oYRJ0dpdBdsMgtMmp1hZ9RX7SfZWNbcrHzjxoKMItSWA9CxUOxAAiB0aDOqvJwj 5KWaRI/XG/jeXpjGAYco+3Hq1Lqn7pHO7n5UzIy7ZJkYOEslIJuNwHYMo1xPyZoTKpWmACTgME39W DTEjGlsiR3ZGhT6NpWR9BJz8wi63dM+Joiqv+bq7kakvfATrHWpjJk1ACfWnGZ37ozVRtvxEZuf9M /qyyyVoC0Y79LtGaoNEQ==; 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 1fFcco-0008Tr-HG; Mon, 07 May 2018 09:40:06 +0000 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fFcck-0008GJ-Eq for ath10k@lists.infradead.org; Mon, 07 May 2018 09:40:05 +0000 Received: by mail-pg0-x244.google.com with SMTP id z4-v6so19805707pgu.13 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=q4dOfRDiU5InqM7HP84/sJpmmAJNbpnP84vIRbfguqrfFzzMRdzxHuy7BjbO3bcruL BloIkz25WKOpDLZ/B71RcxN7JZm46NhN42v8AJthMC1SCKmYvrKPVIwu5bvxrpikNRRC a6KC9Bzd/nNIfrcSW7bFTgefYVzCr9xM95hOFljzA0IMIdkUdpyfDg2w4yD6FdN8NHXg u1BK5YCtK4uAva47l46kYUubX0dEAsurVLBCm2u0YbRfEdv5grsy2bruMa8a6QHAaLqQ hrhQ4P1w9Aq6/g9agk8n0hWSuEZkA9dK7DGPV0d6zMqTRVRPpMEN6/bwgb40a0p6bqUd A2/w== X-Gm-Message-State: ALQs6tA4Q+0nzM/VpqI7jzP1z/Btx2l03ygk5MJPoLJ5eUzP93gJnX3k CO5EDNwG294b+wCrMSeRCiU= 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 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) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180507_024002_537343_777C49CD X-CRM114-Status: GOOD ( 10.40 ) 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, ath10k@lists.infradead.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.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++) {