Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=63fddb9f7f65b41277043344ae0d24dbbb451ada
Commit:     63fddb9f7f65b41277043344ae0d24dbbb451ada
Parent:     c14c521e440a6a83835a2879a4c5f4311b1df68f
Author:     Zhu Yi <[EMAIL PROTECTED]>
AuthorDate: Thu Sep 27 11:27:36 2007 +0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:53:23 2007 -0700

    [PATCH] iwlwifi: removing unnecessary memset in 4965 rate scale
    
    This patch removes redundant memset in rate scale. In rs_alloc_sta,
    kzalloc is used so the memset can be avoided. In rs_rate_init, it is
    a bug fix since it overrides everything set in other handlers namely
    add_debugfs.
    
    Signed-off-by: Tomas Winkler <[EMAIL PROTECTED]>
    Signed-off-by: Zhu Yi <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 drivers/net/wireless/iwlwifi/iwl-4965-rs.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c 
b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index edcc542..86e650d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -1776,10 +1776,9 @@ static void *rs_alloc_sta(void *priv, gfp_t gfp)
 
        if (crl == NULL)
                return NULL;
-
-       memset(crl, 0, sizeof(struct iwl_rate_scale_priv));
        crl->lq.sta_id = 0xff;
 
+
        for (j = 0; j < LQ_SIZE; j++)
                for (i = 0; i < IWL_RATE_COUNT; i++)
                        rs_rate_scale_clear_window(&(crl->lq_info[j].win[i]));
@@ -1796,9 +1795,6 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
        struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
        struct iwl_rate_scale_priv *crl = priv_sta;
 
-       memset(crl, 0, sizeof(struct iwl_rate_scale_priv));
-
-       crl->lq.sta_id = 0xff;
        crl->flush_timer = 0;
        sta->txrate = 3;
        for (j = 0; j < LQ_SIZE; j++)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to