Commit-ID: f1c2c19c498e27de48bf0dc4221e6e31b1823169 Gitweb: http://git.kernel.org/tip/f1c2c19c498e27de48bf0dc4221e6e31b1823169 Author: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> AuthorDate: Wed, 4 Aug 2010 14:17:17 +1000 Committer: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> CommitDate: Wed, 4 Aug 2010 14:17:17 +1000 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@xxxxxxxxxxxxxxxxxxx> --- mm/memblock.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/mm/memblock.c b/mm/memblock.c index 3024eb3..43840b3 100644 --- a/mm/memblock.c +++ b/mm/memblock.c @@ -504,7 +504,7 @@ int __init memblock_is_reserved(u64 addr) int memblock_is_region_reserved(u64 base, u64 size) { - return memblock_overlaps_region(&memblock.reserved, base, size); + return memblock_overlaps_region(&memblock.reserved, base, size) >= 0; } /* -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html