memblock_reserve() can only return an error after memblock_allow_resize() has been called. Before that it either succeeds or panics, never returning an error.
Before memblock_allow_resize() is called, the return value checks of memblock_reserve() are unreachable and can be removed. All the call sites are in different trees, so I split the change into one patch per arch/subsystem. The patches are independent and can be applied separately. --- Changes from v1 [1] - add reviewed-by tag - rebased onto latest memblock for-next [1] https://lore.kernel.org/all/[email protected]/ --- Hello Mike, Like the previous memblock cleanup series, could you review and take this patch series to the memblock tree? Thank you for taking valuable time. Best Regards, Sang-Heon Jeon --- Sang-Heon Jeon (5): x86/setup: remove unreachable memblock_reserve() return value check sh: remove unreachable memblock_reserve() return value check powerpc/fadump: remove unreachable memblock_reserve() return value checks xtensa: remove unreachable memblock_reserve() return value checks Revert "tpm: do not ignore memblock_reserve return value" arch/powerpc/kernel/fadump.c | 14 +++----------- arch/sh/kernel/machine_kexec.c | 7 +------ arch/x86/kernel/setup.c | 7 ++----- arch/xtensa/kernel/setup.c | 13 +++++++------ drivers/firmware/efi/tpm.c | 7 +------ 5 files changed, 14 insertions(+), 34 deletions(-) -- 2.43.0
