diff options
Diffstat (limited to 'lib/bitmap.c')
-rw-r--r-- | lib/bitmap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/bitmap.c b/lib/bitmap.c index d1388a5ce89c..fb9371fdd44a 100644 --- a/lib/bitmap.c +++ b/lib/bitmap.c | |||
@@ -289,7 +289,6 @@ EXPORT_SYMBOL(__bitmap_weight); | |||
289 | 289 | ||
290 | #define CHUNKSZ 32 | 290 | #define CHUNKSZ 32 |
291 | #define nbits_to_hold_value(val) fls(val) | 291 | #define nbits_to_hold_value(val) fls(val) |
292 | #define roundup_power2(val,modulus) (((val) + (modulus) - 1) & ~((modulus) - 1)) | ||
293 | #define unhex(c) (isdigit(c) ? (c - '0') : (toupper(c) - 'A' + 10)) | 292 | #define unhex(c) (isdigit(c) ? (c - '0') : (toupper(c) - 'A' + 10)) |
294 | #define BASEDEC 10 /* fancier cpuset lists input in decimal */ | 293 | #define BASEDEC 10 /* fancier cpuset lists input in decimal */ |
295 | 294 | ||
@@ -316,7 +315,7 @@ int bitmap_scnprintf(char *buf, unsigned int buflen, | |||
316 | if (chunksz == 0) | 315 | if (chunksz == 0) |
317 | chunksz = CHUNKSZ; | 316 | chunksz = CHUNKSZ; |
318 | 317 | ||
319 | i = roundup_power2(nmaskbits, CHUNKSZ) - CHUNKSZ; | 318 | i = ALIGN(nmaskbits, CHUNKSZ) - CHUNKSZ; |
320 | for (; i >= 0; i -= CHUNKSZ) { | 319 | for (; i >= 0; i -= CHUNKSZ) { |
321 | chunkmask = ((1ULL << chunksz) - 1); | 320 | chunkmask = ((1ULL << chunksz) - 1); |
322 | word = i / BITS_PER_LONG; | 321 | word = i / BITS_PER_LONG; |