summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-11-06 09:11:46 (GMT)
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-11-06 09:11:46 (GMT)
commit90b4d60c6103105a634c495003c2ce931f075f63 (patch)
tree033f07fb175a5e0651f6a63fc0fe8e1860555ce5 /lib
parentbac91462e8a8609d7be02a2cbf5c2b406b04ed9f (diff)
parent8f0d8163b50e01f398b14bcd4dc039ac5ab18d64 (diff)
downloadlinux-90b4d60c6103105a634c495003c2ce931f075f63.tar.xz
Merge tag 'v3.7-rc3' into HEAD
Linux 3.7-rc3
Diffstat (limited to 'lib')
-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))