Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Thu, 7 Apr 2005 17:51:45 -0700 | From | Nick Wilson <> | Subject | [PATCH 5/6] lib/bitmap.c: use generic round_up_pow2() macro |
| |
From: Nick Wilson <njw@osdl.org>
Use the generic round_up_pow2() instead of a custom rounding method.
Signed-off-by: Nick Wilson <njw@osdl.org> ---
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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |