projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ACPI / debugger: Fix regression introduced by IS_ERR_VALUE() removal
[linux-2.6-block.git]
/
mm
/
cma.c
diff --git
a/mm/cma.c
b/mm/cma.c
index ea506eb18cd6b2cff00606a6c1e1387b48099ffa..bd0e1412475eb872dd354999d3120a55cce925be 100644
(file)
--- a/
mm/cma.c
+++ b/
mm/cma.c
@@
-183,7
+183,8
@@
int __init cma_init_reserved_mem(phys_addr_t base, phys_addr_t size,
return -EINVAL;
/* ensure minimal alignment required by mm core */
return -EINVAL;
/* ensure minimal alignment required by mm core */
- alignment = PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order);
+ alignment = PAGE_SIZE <<
+ max_t(unsigned long, MAX_ORDER - 1, pageblock_order);
/* alignment should be aligned with order_per_bit */
if (!IS_ALIGNED(alignment >> PAGE_SHIFT, 1 << order_per_bit))
/* alignment should be aligned with order_per_bit */
if (!IS_ALIGNED(alignment >> PAGE_SHIFT, 1 << order_per_bit))
@@
-266,8
+267,8
@@
int __init cma_declare_contiguous(phys_addr_t base,
* migratetype page by page allocator's buddy algorithm. In the case,
* you couldn't get a contiguous memory, which is not what we want.
*/
* migratetype page by page allocator's buddy algorithm. In the case,
* you couldn't get a contiguous memory, which is not what we want.
*/
- alignment = max(alignment,
-
(phys_addr_t)PAGE_SIZE << max(
MAX_ORDER - 1, pageblock_order));
+ alignment = max(alignment,
(phys_addr_t)PAGE_SIZE <<
+
max_t(unsigned long,
MAX_ORDER - 1, pageblock_order));
base = ALIGN(base, alignment);
size = ALIGN(size, alignment);
limit &= ~(alignment - 1);
base = ALIGN(base, alignment);
size = ALIGN(size, alignment);
limit &= ~(alignment - 1);