summaryrefslogtreecommitdiff
path: root/lib/genalloc.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-11-15 10:34:22 (GMT)
committerGrant Likely <grant.likely@secretlab.ca>2012-11-15 10:34:22 (GMT)
commitda63d20bfb12827dd7747a841ea27348af3abc0a (patch)
treeba275a74d068f91b453c08b9bacf8afe9577db9b /lib/genalloc.c
parent55020c8056a83ef2181e4cddd39cb2b9f4b88c5a (diff)
parent77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff)
downloadlinux-fsl-qoriq-da63d20bfb12827dd7747a841ea27348af3abc0a.tar.xz
Merge tag 'v3.7-rc5' into devicetree/next
Linux 3.7-rc5
Diffstat (limited to 'lib/genalloc.c')
-rw-r--r--lib/genalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/genalloc.c b/lib/genalloc.c
index ca208a9..5492043 100644
--- a/lib/genalloc.c
+++ b/lib/genalloc.c
@@ -178,7 +178,7 @@ int gen_pool_add_virt(struct gen_pool *pool, unsigned long virt, phys_addr_t phy
struct gen_pool_chunk *chunk;
int nbits = size >> pool->min_alloc_order;
int nbytes = sizeof(struct gen_pool_chunk) +
- (nbits + BITS_PER_BYTE - 1) / BITS_PER_BYTE;
+ BITS_TO_LONGS(nbits) * sizeof(long);
chunk = kmalloc_node(nbytes, GFP_KERNEL | __GFP_ZERO, nid);
if (unlikely(chunk == NULL))