lmb: change the return code on lmb_alloc_addr()
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Fri, 14 Mar 2025 10:57:02 +0000 (12:57 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 24 Mar 2025 17:12:33 +0000 (11:12 -0600)
commit67be24906feb6efecce70cd5bfdc2ba8f06d3d5b
treee56ec2da79f287a6568eae8a040046d6afa0be0a
parent244e61fbb7f5045e4e187024f7ae80434c952145
lmb: change the return code on lmb_alloc_addr()

Ben reports a failure to boot the kernel on hardware that starts its
physical memory from 0x0.
The reason is that lmb_alloc_addr(), which is supposed to reserve a
specific address, takes the address as the first argument, but then also
returns the address for success or failure and treats 0 as a failure.

Since we already know the address change the prototype to return an int.

Reported-by: Ben Schneider <ben@bens.haus>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Ben Schneider <ben@bens.haus>
Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
fs/fs.c
include/lmb.h
lib/efi_loader/efi_memory.c
lib/lmb.c
test/lib/lmb.c