Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1c2c19c authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt
Browse files

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: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 3a09b1be
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -504,7 +504,7 @@ int __init memblock_is_reserved(u64 addr)


int memblock_is_region_reserved(u64 base, u64 size)
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;
}
}


/*
/*