summaryrefslogtreecommitdiffstats
path: root/lib/genalloc.c
diff options
context:
space:
mode:
authorZhao Qiang <qiang.zhao@freescale.com>2015-11-30 10:48:54 +0800
committerScott Wood <scottwood@freescale.com>2015-12-22 17:10:18 -0600
commit0e6e01ff694ee222acc5a9184211678473c948e3 (patch)
treeb3c1809b02b0b8accf5b7b8ca82c632842799e7a /lib/genalloc.c
parentb26981c8f743d3cb64a6907eb1f5c6c4ba6ca672 (diff)
downloadlinux-stable-0e6e01ff694ee222acc5a9184211678473c948e3.tar.gz
linux-stable-0e6e01ff694ee222acc5a9184211678473c948e3.tar.bz2
linux-stable-0e6e01ff694ee222acc5a9184211678473c948e3.zip
CPM/QE: use genalloc to manage CPM/QE muram
Use genalloc to manage CPM/QE muram instead of rheap. Signed-off-by: Zhao Qiang <qiang.zhao@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
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 5ec83cd93284..0a1139644d32 100644
--- a/lib/genalloc.c
+++ b/lib/genalloc.c
@@ -576,7 +576,7 @@ unsigned long gen_pool_fixed_alloc(unsigned long *map, unsigned long size,
fixed_data = data;
order = pool->min_alloc_order;
offset_bit = fixed_data->offset >> order;
- if (WARN_ON(fixed_data->offset & (1UL << order - 1)))
+ if (WARN_ON(fixed_data->offset & ((1UL << order) - 1)))
return size;
start_bit = bitmap_find_next_zero_area(map, size,