Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=789675e216617b1331875c42a81f58227a06df91
Commit:     789675e216617b1331875c42a81f58227a06df91
Parent:     e870a8efcddaaa3da7e180b6ae21239fb96aa2bb
Author:     Eric Dumazet <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 3 20:40:01 2008 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:00:35 2008 -0800

    [NET]: Avoid divides in net/core/gen_estimator.c
    
    We can void divides (as seen with CONFIG_CC_OPTIMIZE_FOR_SIZE=y on x86)
    changing ((HZ<<idx)/4) to ((HZ/4) << idx)
    
    Signed-off-by: Eric Dumazet <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/core/gen_estimator.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c
index daadbcc..86037d1 100644
--- a/net/core/gen_estimator.c
+++ b/net/core/gen_estimator.c
@@ -135,7 +135,7 @@ skip:
        }
 
        if (!list_empty(&elist[idx].list))
-               mod_timer(&elist[idx].timer, jiffies + ((HZ<<idx)/4));
+               mod_timer(&elist[idx].timer, jiffies + ((HZ/4) << idx));
        rcu_read_unlock();
 }
 
@@ -191,7 +191,7 @@ int gen_new_estimator(struct gnet_stats_basic *bstats,
        }
 
        if (list_empty(&elist[idx].list))
-               mod_timer(&elist[idx].timer, jiffies + ((HZ<<idx)/4));
+               mod_timer(&elist[idx].timer, jiffies + ((HZ/4) << idx));
 
        list_add_rcu(&est->list, &elist[idx].list);
        return 0;
-
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