linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: linux-wireless@vger.kernel.org,
	Sara Sharon <sara.sharon@intel.com>,
	Luca Coelho <luciano.coelho@intel.com>
Subject: [PATCH 03/18] iwlwifi: mvm: remove pointless NULL assignment
Date: Fri, 14 Dec 2018 22:29:30 +0200	[thread overview]
Message-ID: <20181214202945.32375-4-luca@coelho.fi> (raw)
In-Reply-To: <20181214202945.32375-1-luca@coelho.fi>

From: Sara Sharon <sara.sharon@intel.com>

Assigning mvmsta to be NULL when we are about to exit the
function is pointless. Remove it. Move the variable declaration
to the scope it is used.

Signed-off-by: Sara Sharon <sara.sharon@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index 7a9ec6810395..2738cd307765 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -1472,7 +1472,6 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
 		iwl_mvm_get_agg_status(mvm, tx_resp);
 	u32 status = le16_to_cpu(agg_status->status);
 	u16 ssn = iwl_mvm_get_scd_ssn(mvm, tx_resp);
-	struct iwl_mvm_sta *mvmsta;
 	struct sk_buff_head skbs;
 	u8 skb_freed = 0;
 	u8 lq_color;
@@ -1620,7 +1619,7 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
 		goto out;
 
 	if (!IS_ERR(sta)) {
-		mvmsta = iwl_mvm_sta_from_mac80211(sta);
+		struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
 
 		iwl_mvm_tx_airtime(mvm, mvmsta,
 				   le16_to_cpu(tx_resp->wireless_media_time));
@@ -1683,10 +1682,7 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
 			mvmsta->next_status_eosp = false;
 			ieee80211_sta_eosp(sta);
 		}
-	} else {
-		mvmsta = NULL;
 	}
-
 out:
 	rcu_read_unlock();
 }
-- 
2.19.2


  parent reply	other threads:[~2018-12-14 20:29 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-14 20:29 [PATCH 00/18] iwlwifi: updates intended for v4.21 2018-12-14 Luca Coelho
2018-12-14 20:29 ` [PATCH 01/18] iwlwifi: pcie: use iwl_tx_cmd_gen2 and not iwl_tx_cmd Luca Coelho
2018-12-14 20:29 ` [PATCH 02/18] iwlwifi: mvm: remove dead code Luca Coelho
2018-12-14 20:29 ` Luca Coelho [this message]
2018-12-14 20:29 ` [PATCH 04/18] iwlwifi: mvm: cleanup iwl_mvm_tx_skb_non_sta Luca Coelho
2018-12-14 20:29 ` [PATCH 05/18] iwlwifi: mvm: fix setting HE ppe FW config Luca Coelho
2018-12-14 20:29 ` [PATCH 06/18] [BUGFIXiwlwifi: make MVM and DVM depend on MAC80211 Luca Coelho
2018-12-18 16:17   ` Kalle Valo
2018-12-19 10:24     ` Luca Coelho
2018-12-14 20:29 ` [PATCH 07/18] iwlwifi: split HE capabilities between AP and STA Luca Coelho
2018-12-14 20:29 ` [PATCH 08/18] iwlwifi: mvm: handle RX no data notification Luca Coelho
2018-12-14 20:29 ` [PATCH 09/18] iwlwifi: mvm: take station lock later in the code Luca Coelho
2018-12-14 20:29 ` [PATCH 10/18] iwlwifi: pcie: lock txq a bit later in reclaim code Luca Coelho
2018-12-14 20:29 ` [PATCH 11/18] iwlwifi: mvm: clean up SSN incrementation Luca Coelho
2018-12-14 20:29 ` [PATCH 12/18] iwlwifi: wrt: add rt status and num of rx/tx fifos to dump Luca Coelho
2018-12-14 20:29 ` [PATCH 13/18] iwlwifi: remove unused and wrong PHY_CFG_* macros Luca Coelho
2018-12-14 20:29 ` [PATCH 14/18] iwlwifi: mvm: set TWT responder capability bit in 11AX SoftAP mode Luca Coelho
2018-12-14 20:29 ` [PATCH 15/18] iwlwifi: mvm: fix spelling mistake "Recieved" -> "Received" Luca Coelho
2018-12-14 20:29 ` [PATCH 16/18] iwlwifi: mvm: d3: use struct_size() in kzalloc() Luca Coelho
2018-12-14 20:29 ` [PATCH 17/18] iwlwifi: dbg: add debug data to warning Luca Coelho
2018-12-14 20:29 ` [PATCH 18/18] iwlwifi: bump the API version to 43 for 9000 and 22000 Luca Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181214202945.32375-4-luca@coelho.fi \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=sara.sharon@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).