[PATCH 5/6] lib/bitmap.c: use generic round_up_pow2() macro
From: Nick Wilson
Date: Thu Apr 07 2005 - 19:59:20 EST
From: Nick Wilson <njw@xxxxxxxx>
Use the generic round_up_pow2() instead of a custom rounding method.
Signed-off-by: Nick Wilson <njw@xxxxxxxx>
---
bitmap.c | 3 +--
1 files changed, 1 insertion(+), 2 deletions(-)
Index: linux/lib/bitmap.c
===================================================================
--- linux.orig/lib/bitmap.c 2005-04-07 15:13:56.000000000 -0700
+++ linux/lib/bitmap.c 2005-04-07 15:46:15.000000000 -0700
@@ -289,7 +289,6 @@ EXPORT_SYMBOL(__bitmap_weight);
#define CHUNKSZ 32
#define nbits_to_hold_value(val) fls(val)
-#define roundup_power2(val,modulus) (((val) + (modulus) - 1) & ~((modulus) - 1))
#define unhex(c) (isdigit(c) ? (c - '0') : (toupper(c) - 'A' + 10))
#define BASEDEC 10 /* fancier cpuset lists input in decimal */
@@ -316,7 +315,7 @@ int bitmap_scnprintf(char *buf, unsigned
if (chunksz == 0)
chunksz = CHUNKSZ;
- i = roundup_power2(nmaskbits, CHUNKSZ) - CHUNKSZ;
+ i = round_up_pow2(nmaskbits, CHUNKSZ) - CHUNKSZ;
for (; i >= 0; i -= CHUNKSZ) {
chunkmask = ((1ULL << chunksz) - 1);
word = i / BITS_PER_LONG;
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/