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: 10291061 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 8922160291 for ; Sun, 18 Mar 2018 07:50:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 75A2428C63 for ; Sun, 18 Mar 2018 07:50:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6606A28FA4; Sun, 18 Mar 2018 07:50:52 +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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham 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 D663728C63 for ; Sun, 18 Mar 2018 07:50:51 +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=rqSwpPugsRuLyvVvIrbEDqs+VnnOvyeUFOxfDc2HMGk=; b=AcW7SAi7TfMvlu 1/H7KHPcjOfMrXdrRu41eBF2hi9MQwpLZDYezrGWmnbwmPxWv1Zm9ARhCJvatNf8wonF0Q54nRMrv sdx+CCNLiV9XfM04JiIOJADIQlHrNG7Ny3HYRm3LM3f6MHGgdf25b4GMhjbP0FQLswVaVDqpubz/Y NcNMaEoT2pxhZeiSLfJxChRY3L8TyomLgiHBHr17LDC6HkY3T7Hrc/NgmOXhHcoYlIKhsKdKe1Zlw muGf9UvmvtwKeVTs+cTIk3pdFWb2Yws2w0XpknRAKay2/H2C98r3Kib+S3Fbmk2Dqm69naR8WwFhm OhDt5UAR6eyTHVbz/6Gw==; 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 1exT5M-0003Nj-OH; Sun, 18 Mar 2018 07:50:32 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1exT5I-00035N-GH for ath10k@lists.infradead.org; Sun, 18 Mar 2018 07:50:30 +0000 Received: by mail-pf0-x241.google.com with SMTP id m68so5816757pfm.11 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=TAXdJF1TJLvrSmhJzTIkgp5Snt4oja4R83qgjFeVfiL8NpP0NEx1mNkAhxJDBNxEoZ HslpdrgPvcL2+O3WMij5GEekArXjYC0aJ84HoD4HmCEEFAg7eJOIJI/bdh3s//yquEMm J6SaVAMP371CBKnlQ72polsCuHLlhl3/ntMKc+GpH/6HtOCjK8fGOJ1fnf/ssUvNNtSO rxFgGXBD8z6C8OARNVppdNFLEx4k7l1sgL8Jm8cUMrEXlHAN3RYlbVgd8MxW5iGFUcH4 Ud2I7R63H+Gr1DrvgjyYjgbVZNCJUeJCEUeRYwYXRk0HvmXNiLPmzzzADpGo5OumQ6gY VjAQ== X-Gm-Message-State: AElRT7Hd2lZX3iQQxMBxyNy6pbgA7OY/Wf71vr7tBQuwptkaTryB5M/C OXUJtUFzPNYr655rnLEU4QA= 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 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) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180318_005028_699369_9F0685CE X-CRM114-Status: UNSURE ( 9.09 ) 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, 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 --- 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);