From patchwork Sun Mar 18 07:50:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenneth Lu X-Patchwork-Id: 10291063 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 14BA7602BD for ; Sun, 18 Mar 2018 07:53:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9FB928EAF for ; Sun, 18 Mar 2018 07:53:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDC5328FA4; Sun, 18 Mar 2018 07:53:18 +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=unavailable 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 8142828EAF for ; Sun, 18 Mar 2018 07:53:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751391AbeCRHuT (ORCPT ); Sun, 18 Mar 2018 03:50:19 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:45085 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750943AbeCRHuS (ORCPT ); Sun, 18 Mar 2018 03:50:18 -0400 Received: by mail-pf0-f196.google.com with SMTP id l27so1296100pfk.12 for ; Sun, 18 Mar 2018 00:50:18 -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=rmc3bqIjM+aWESAHI3oZMlJ1lJN6szaWRwXH5YEW7sc=; b=NkTMllqj2JhTO/HUQJoY0rbAzfzcuoC9GKiKbrSRHvFsb2dZNquly9IuMdbvfrLplh cT5KfRZple6K3y0ELdHStwep4xNwe6xnfztfVQ8DmWHH49uq0sOP23055AFKctnB/b2M F+wuQaLkpOdsVLgJPJml5SoucS8EkFoZ6fEBipu4EzoN9oR3JKO8Bz4mK4FWyUP8o2sx oabpzHt9s5Y7IuvmH17DhD2iA9wHrevvkKd157WBEkxG4PleaU9A4F5JpTOCFuRx5pc+ ZiwEPhHaSBzlQpY+SlYyLkrz1f03vdGdTf1ph3F87OJre4OOGhPFoAmHo7GpksjI0T+E Km+Q== 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=rmc3bqIjM+aWESAHI3oZMlJ1lJN6szaWRwXH5YEW7sc=; b=THsETBZJOsjMyRgmWUKYYmhCQpyYMoVMnDMsX7cFvL7xhtoveblO2HOUVtcjP+pxSB I3vGXCXSGfTJatIBHw/MTKkzFhuhrh8h7RiZU7+5x0/yFj/zAlUXlS0czG+RuTjMVzoQ TfKzK368wEcU7yGH5JLib9khdiqP/c7tm3SXUeW/18KrNF4qNRt1e0FAs+jO0dNUmIOo QG9GkWvcQLxj6Qs55QJu1l7iaJKH8LrP9DK3F4tpjMtgQ+5Pybto2pYA+vb0BSO8lrEn 2EVhqo5Plc4wK0rjwjXH9rnigeR6fBc04t0gIe2NjelhsJ4FK6MzHvFtDOLxq0oMRIEm RVnA== X-Gm-Message-State: AElRT7F9PgQENMx+cibrRMRSSfYsHdyBZIXGOR8ocmt/0Fy92yaulih+ IUaGE8/S4KvqXpnHT0Zu1eL0OfBElHY= X-Google-Smtp-Source: AG47ELsfY+t71odF41FCc/mLb4pYnhpeYmandYEtvYr8p7QsTdOs6WCDJBd01oZDJAU/I1iKnNP8TA== X-Received: by 10.101.71.202 with SMTP id f10mr5760354pgs.366.1521359417613; Sun, 18 Mar 2018 00:50:17 -0700 (PDT) Received: from blackstone (220-133-32-83.HINET-IP.hinet.net. [220.133.32.83]) by smtp.gmail.com with ESMTPSA id e5sm17406474pgs.17.2018.03.18.00.50.16 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 18 Mar 2018 00:50:16 -0700 (PDT) Date: Sun, 18 Mar 2018 15:50:14 +0800 From: Kenneth Lu To: kvalo@qca.qualcomm.com Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH] ath10k: remove variables which set but not used Message-ID: <20180318075014.GA26784@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 --- drivers/net/wireless/ath/ath10k/wmi.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 58dc218..da9552d 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -2308,7 +2308,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; @@ -2320,7 +2319,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); @@ -2708,14 +2706,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++) { @@ -2763,14 +2760,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++) { @@ -2824,7 +2820,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; @@ -2833,7 +2828,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++) { @@ -2903,7 +2897,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; @@ -2912,7 +2905,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++) { @@ -2991,7 +2983,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; @@ -3002,7 +2993,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);