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>
This commit is contained in:
Benjamin Herrenschmidt 2010-08-04 14:17:17 +10:00
Родитель 61a3e1665f
Коммит 2ed9aae0fa
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;
}
/*