From patchwork Wed Nov 9 05:50:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirtika Ruchandani X-Patchwork-Id: 9418501 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 CFA8A601C0 for ; Wed, 9 Nov 2016 05:50:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEA8128A0B for ; Wed, 9 Nov 2016 05:50:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B18CD28A1F; Wed, 9 Nov 2016 05:50:26 +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 0077F28A0B for ; Wed, 9 Nov 2016 05:50:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751100AbcKIFuX (ORCPT ); Wed, 9 Nov 2016 00:50:23 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33774 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751015AbcKIFuW (ORCPT ); Wed, 9 Nov 2016 00:50:22 -0500 Received: by mail-pf0-f195.google.com with SMTP id 144so13893235pfv.0 for ; Tue, 08 Nov 2016 21:50:21 -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 :user-agent; bh=x+4sLAYERGm2ZrjQu4qMhH1bojRK5KvFreU8SRqxT+M=; b=GVYP7zvBMGpsELI0VRNVnxpbViXO4Emh1gZa6vyEqOvgVOu81K4sdl8l4weGFfpWRp nUDhJXgAQful7yOUa1qs7uEDmgV/G/0zOuZRi2F+yCM2PiCbXds37sgRyUOJ9zqfRrlf R/HKVrFXa5hYls79iz75eMaWHM1tPHv1qrBiMo1SeVv2yWQea5ScR+2Hfn+Mri+u3NSk kFoBtlEuEhQ6OuRk+h/9SUWcvOylkf3xZEsnaCHdJ5mDUOKdveassA3DgzmsiSHIU/7r ahqjQrMuf9Z5H8PZSxOA9H9LIsXfdAyXUI1umqCEdyJsrtT+qv6IpjDzU0rqQATRT5tj X8zw== 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:user-agent; bh=x+4sLAYERGm2ZrjQu4qMhH1bojRK5KvFreU8SRqxT+M=; b=NPwZWMDBpbs60nsUcFjkuNYYdXeBhDAwiETkZJrnC7ERqQXvxKn/wkGZln60RgGkMQ 3DlrSRZOVfGenl+revlbvBuOznVgDsJKCUYZd0A1d85FAe/lUzQsmqZTQk5+mkC2qE1k 4AbOneQzsDApUw1f22f07FQcQpy4N2FQZtQdeHpDbMHlWmjjC108fK0XhCdPMxYezJ8s CJM+nGTILfTI/8ESqP+O/j/MWzjdpzZ+Z/AcP2qM8Vpxa5p8iyImtvMuumRXxfasUCXv nOGcIdxcehEnBWXa2g7mfhpov8iGEsm0Vleh2PpLRUMaVKHtQxxAwIo/Z9st4XVgsy6Q eZnQ== X-Gm-Message-State: ABUngvcDLdUt2mdosOKJVPcDrVyYbcI7If8wv/zg9VU0VEVKDiKhbKPiezMb2z8Ik2REcQ== X-Received: by 10.98.33.133 with SMTP id o5mr29964608pfj.32.1478670621497; Tue, 08 Nov 2016 21:50:21 -0800 (PST) Received: from google.com ([2620:0:1000:1301:1586:5d00:9edf:6894]) by smtp.gmail.com with ESMTPSA id wc6sm52178316pab.47.2016.11.08.21.50.19 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 08 Nov 2016 21:50:20 -0800 (PST) From: Kirtika Ruchandani X-Google-Original-From: Kirtika Ruchandani Date: Tue, 8 Nov 2016 21:50:15 -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 1/3] iwlwifi: mvm: rs: Remove unused 'mvmvif'/'mvmsta' variables Message-ID: <20161109055015.GA27416@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 mvmvif is defined and set in rs_mimo_allow but not used. Compiling iwlwifi with W=1 gives the following warning, remove it. mvmsta is used only to obtain mvmvif so remove it as well. iwlwifi/mvm/rs.c: In function 'rs_mimo_allow': iwlwifi/mvm/rs.c:165:22: warning: variable 'mvmvif' set but not used.[-Wunused-but-set-variable] This fix removes calls to iwl_mvm_sta_from_mac & iwl_mvm_vif_from_mac. They are both accessors, and do not have any side-effects. Commit e621c2282 removed a workaround that disabled MIMO on P2P, 'mvmvif' was used for that workaround, but not removed with it. Fixes: e621c2282e31 ("iwlwifi: rs: Remove workaround that disables MIMO on P2P") Signed-off-by: Kirtika Ruchandani Cc: Alexander Bondar Cc: Emmanuel Grumbach --- drivers/net/wireless/intel/iwlwifi/mvm/rs.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c index 227c5ed..0b79f4a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs.c @@ -161,9 +161,6 @@ static bool rs_mimo_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta, struct rs_rate *rate, const struct rs_tx_column *next_col) { - struct iwl_mvm_sta *mvmsta; - struct iwl_mvm_vif *mvmvif; - if (!sta->ht_cap.ht_supported) return false; @@ -176,9 +173,6 @@ static bool rs_mimo_allow(struct iwl_mvm *mvm, struct ieee80211_sta *sta, if (!iwl_mvm_bt_coex_is_mimo_allowed(mvm, sta)) return false; - mvmsta = iwl_mvm_sta_from_mac80211(sta); - mvmvif = iwl_mvm_vif_from_mac80211(mvmsta->vif); - if (mvm->nvm_data->sku_cap_mimo_disabled) return false;