From patchwork Wed Nov 9 05:50:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kirtika Ruchandani X-Patchwork-Id: 9418503 X-Patchwork-Delegate: luca@coelho.fi 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 5D82B601C0 for ; Wed, 9 Nov 2016 05:50:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B44E28A0B for ; Wed, 9 Nov 2016 05:50:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EEB828A1F; Wed, 9 Nov 2016 05:50:45 +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 5F8B028A0B for ; Wed, 9 Nov 2016 05:50:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751241AbcKIFuk (ORCPT ); Wed, 9 Nov 2016 00:50:40 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35098 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751015AbcKIFuk (ORCPT ); Wed, 9 Nov 2016 00:50:40 -0500 Received: by mail-pf0-f194.google.com with SMTP id i88so22240936pfk.2 for ; Tue, 08 Nov 2016 21:50:39 -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:mime-version:content-disposition :content-transfer-encoding:user-agent; bh=rBwCynTNCcRRpaPWKQN4kYcuaegcSrqUR+vl/269iHk=; b=kJ4hvUcTVAWK8tpy808fgpAJLDQkuekYs1qsvQBw0jL2cwwVX4DGuZ6upnugknKpRM xqMvkBZnzLvTKcK/d8bmuXBdnxIev26H4zCyzRP0+qcl7p4GgMg9YcegudP9L4YJWfPS FnlYJhmiEWTsZ6sCFCxUFg6THVnVHKWjr4cdLUWIlI/6wLo8teVeANbw5OZgf+tNVm4N ucFAitgGzndAs4J13RX0uhFGfaAEBhnwRvNA1e+KXNk0UWjEIrtzJy2CpxMj19F+ZCPD 3Tjep7TCxbn1/peJNFgfEVMhzf0j8NhauvLC8TpHzc/MxFCSy8lDRtP1hPjcmd27QkOE ozHQ== 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:mime-version :content-disposition:content-transfer-encoding:user-agent; bh=rBwCynTNCcRRpaPWKQN4kYcuaegcSrqUR+vl/269iHk=; b=PTryUlKDr8Kroy3xpotgVBBlHXjToGM4AbRXoiY5GiJVF3Wl1Vv5JWrmOABfwj+FwB 84plvjqVCJaECFoTetWlytyaZhuL3jhLzLYim6FM6vW44oRLAPDiN8NpYJXs0BTjPTc+ Cqp+ypQRaZQUT2LqtME9Dy+J3M/xaRxpzAwRpy005GTqGkcdWMJgaCc/MPXO6JUthoTd FIHq1WIjlv6sHOEce3auBL+4dyCTC3wV8lPtA5MrzMqFrod03p5okutGbNwbbf13oz+s xsmU2VD5O4TcvTuG1cnBf6z1soabfC1KPznLwxhJnx98p4UF7p7pRKljCi74FTZQ7m/D vI5w== X-Gm-Message-State: ABUngvcoVsLBjt/F2CgLqESUYNas9eg9G1CBNDVyHxjfFvzXC1wmImf1k5Wi3mR2XliHqw== X-Received: by 10.99.50.67 with SMTP id y64mr12335803pgy.146.1478670639238; Tue, 08 Nov 2016 21:50:39 -0800 (PST) Received: from google.com ([2620:0:1000:1301:1586:5d00:9edf:6894]) by smtp.gmail.com with ESMTPSA id 64sm40638283pfu.17.2016.11.08.21.50.38 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 08 Nov 2016 21:50:38 -0800 (PST) From: Kirtika Ruchandani X-Google-Original-From: Kirtika Ruchandani Date: Tue, 8 Nov 2016 21:50:33 -0800 To: Luca Coelho Cc: linux-wireless@vger.kernel.org, Arnd Bergmann , Kalle Valo , Emmanuel Grumbach , Johannes Berg , Sara Sharon , Eran Harary , Liad Kaufman , Eyal Shapira , Alexander Bondar Subject: [PATCH v2 2/3] iwlwifi: mvm: rs: Remove unused 'mcs' variable Message-ID: <20161109055033.GA27470@google.com> MIME-Version: 1.0 Content-Disposition: inline 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 Commit 5fc0f76c4 introduced Rx stats from debugfs, the function iwl_mvm_reset_frame_stats from that commit defines and sets mcs but does not use it. Compiling iwlwifi with W=1 gives this warning - iwlwifi/mvm/rs.c: In function ‘iwl_mvm_update_frame_stats’: iwlwifi/mvm/rs.c:3074:14: warning: variable ‘mcs’ set but not used [-Wunused-but-set-variable] Fixes: 5fc0f76c43bd (iwlwifi: mvm: add Rx frames statistics via debugfs) Signed-off-by: Kirtika Ruchandani Cc: Eyal Shapira --- drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c index 0b79f4a..80f99c3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c @@ -3065,7 +3065,7 @@ static void iwl_mvm_reset_frame_stats(struct iwl_mvm *mvm) void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg) { - u8 nss = 0, mcs = 0; + u8 nss = 0; spin_lock(&mvm->drv_stats_lock); @@ -3093,11 +3093,9 @@ void iwl_mvm_update_frame_stats(struct iwl_mvm *mvm, u32 rate, bool agg) if (rate & RATE_MCS_HT_MSK) { mvm->drv_rx_stats.ht_frames++; - mcs = rate & RATE_HT_MCS_RATE_CODE_MSK; nss = ((rate & RATE_HT_MCS_NSS_MSK) >> RATE_HT_MCS_NSS_POS) + 1; } else if (rate & RATE_MCS_VHT_MSK) { mvm->drv_rx_stats.vht_frames++; - mcs = rate & RATE_VHT_MCS_RATE_CODE_MSK; nss = ((rate & RATE_VHT_MCS_NSS_MSK) >> RATE_VHT_MCS_NSS_POS) + 1; } else {