linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] iwlwifi: remove duplicate initialization
@ 2011-02-26  1:56 Dan Carpenter
  2011-02-26  5:01 ` Guy, Wey-Yi
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-02-26  1:56 UTC (permalink / raw)
  To: John W. Linville
  Cc: Wey-Yi Guy, Meenakshi Venkataraman, Johannes Berg, linux-wireless,
	kernel-janitors

rate_mask is initialized again later so this can be removed.  Btw, if 
rate_control_send_low(sta, priv_sta, txrc) returns false, that means
that "sta" is non-NULL.  That's why the second initialization of
rate_mask is a little simpler than the first.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/net/wireless/iwlegacy/iwl-3945-rs.c b/drivers/net/wireless/iwlegacy/iwl-3945-rs.c
index 4fabc54..977bd24 100644
--- a/drivers/net/wireless/iwlegacy/iwl-3945-rs.c
+++ b/drivers/net/wireless/iwlegacy/iwl-3945-rs.c
@@ -644,7 +644,7 @@ static void iwl3945_rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
 	u32 fail_count;
 	s8 scale_action = 0;
 	unsigned long flags;
-	u16 rate_mask = sta ? sta->supp_rates[sband->band] : 0;
+	u16 rate_mask;
 	s8 max_rate_idx = -1;
 	struct iwl_priv *priv __maybe_unused = (struct iwl_priv *)priv_r;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] iwlwifi: remove duplicate initialization
  2011-02-26  1:56 [patch] iwlwifi: remove duplicate initialization Dan Carpenter
@ 2011-02-26  5:01 ` Guy, Wey-Yi
  0 siblings, 0 replies; 2+ messages in thread
From: Guy, Wey-Yi @ 2011-02-26  5:01 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: John W. Linville, Venkataraman, Meenakshi, Berg, Johannes,
	linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org

On Fri, 2011-02-25 at 17:56 -0800, Dan Carpenter wrote:
> rate_mask is initialized again later so this can be removed.  Btw, if 
> rate_control_send_low(sta, priv_sta, txrc) returns false, that means
> that "sta" is non-NULL.  That's why the second initialization of
> rate_mask is a little simpler than the first.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>

make sense

Wey



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-26  5:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-26  1:56 [patch] iwlwifi: remove duplicate initialization Dan Carpenter
2011-02-26  5:01 ` Guy, Wey-Yi

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).