Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=199126a23a091585670fba023529b73047bb2bad
Commit:     199126a23a091585670fba023529b73047bb2bad
Parent:     d9da466a3ce2ac005e05bb649a0f2cfb5c3d5d45
Author:     vignesh babu <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 9 11:50:22 2007 -0700
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 12:22:30 2007 -0400

    Use is_power_of_2() in myri10ge/myri10ge.c
    
    Replace (n & (n-1)) with is_power_of_2()
    
    Signed-off-by: vignesh babu <[EMAIL PROTECTED]>
    Cc: Brice Goglin <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/myri10ge/myri10ge.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index d0cc122..e1732c1 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -60,6 +60,7 @@
 #include <linux/crc32.h>
 #include <linux/moduleparam.h>
 #include <linux/io.h>
+#include <linux/log2.h>
 #include <net/checksum.h>
 #include <asm/byteorder.h>
 #include <asm/io.h>
@@ -1804,7 +1805,7 @@ static int myri10ge_open(struct net_device *dev)
         */
        big_pow2 = dev->mtu + ETH_HLEN + VLAN_HLEN + MXGEFW_PAD;
        if (big_pow2 < MYRI10GE_ALLOC_SIZE / 2) {
-               while ((big_pow2 & (big_pow2 - 1)) != 0)
+               while (!is_power_of_2(big_pow2))
                        big_pow2++;
                mgp->big_bytes = dev->mtu + ETH_HLEN + VLAN_HLEN + MXGEFW_PAD;
        } else {
-
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