aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memblock.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-08-04 00:17:17 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-08-08 21:21:38 -0400
commit2ed9aae0facd603f9f9b8347d1d7e9de23bde286 (patch)
treeddecb718dcbe08e1491dee0df45ef0ec3f488309 /mm/memblock.c
parent61a3e1665f714640a888e9ac5470e94696ac545b (diff)
memblock: Fix memblock_is_region_reserved() to return a boolean
All callers expect a boolean result which is true if the region overlaps a reserved region. However, the implementation actually returns -1 if there is no overlap, and a region index (0 based) if there is. Make it behave as callers (and common sense) expect. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'mm/memblock.c')
-rw-r--r--mm/memblock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memblock.c b/mm/memblock.c
index 3024eb30fc27..43840b305ecb 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -504,7 +504,7 @@ int __init memblock_is_reserved(u64 addr)
504 504
505int memblock_is_region_reserved(u64 base, u64 size) 505int memblock_is_region_reserved(u64 base, u64 size)
506{ 506{
507 return memblock_overlaps_region(&memblock.reserved, base, size); 507 return memblock_overlaps_region(&memblock.reserved, base, size) >= 0;
508} 508}
509 509
510/* 510/*