Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9329f4e4d261bb026b53565e22b7fab1d2973cd0 Commit: 9329f4e4d261bb026b53565e22b7fab1d2973cd0 Parent: 67b3c27c8a8d8f81ffc3fe0afc0d805d66744d18 Author: Robert P. J. Day <[EMAIL PROTECTED]> AuthorDate: Thu Dec 13 16:02:55 2007 -0800 Committer: David S. Miller <[EMAIL PROTECTED]> CommitDate: Mon Jan 28 15:07:19 2008 -0800
pcmcia net: use roundup_pow_of_two() macro instead of grotesque loop Signed-off-by: Robert P. J. Day <[EMAIL PROTECTED]> Cc: Jeff Garzik <[EMAIL PROTECTED]> Cc: Dominik Brodowski <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]> --- drivers/net/pcmcia/pcnet_cs.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 51bbd58..9ba56aa 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c @@ -38,6 +38,7 @@ #include <linux/delay.h> #include <linux/ethtool.h> #include <linux/netdevice.h> +#include <linux/log2.h> #include "../8390.h" #include <pcmcia/cs_types.h> @@ -1484,8 +1485,7 @@ static int setup_shmem_window(struct pcmcia_device *link, int start_pg, window_size = 32 * 1024; /* Make sure it's a power of two. */ - while ((window_size & (window_size - 1)) != 0) - window_size += window_size & ~(window_size - 1); + window_size = roundup_pow_of_two(window_size); /* Allocate a memory window */ req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM|WIN_ENABLE; - 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