mm/memblock: simplify reserve_mem_init error handling
PATCH 1/1 mm/memblock: simplify reserve_mem_init error handling
From: Hongfu Li <[email protected]>
Return prepare_kho_fdt() directly instead of assigning to a local and returning it on both success and failure paths.
--- mm/memblock.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
mm/memblock.c +1 -6
@@ -2616,15 +2616,10 @@ static int __init prepare_kho_fdt(void)static int __init reserve_mem_init (void ) { -int err; -if (!kho_is_enabled () || !reserved_mem_count)return 0 ; - err =prepare_kho_fdt (); -if (err) -return err; -return err; +return prepare_kho_fdt (); }late_initcall (reserve_mem_init);
Signature · 1 line
2.54.0
Quoted 2 lines · Hongfu Li
Return
prepare_kho_fdt()directly instead of assigning to a local and returning it on both success and failure paths.
Thanks for the patch, but the same change was already posted [1]. As mentioned in the cover letter, I can send it as a separate patch if needed.
[1] https://lore.kernel.org/all/[email protected]/
Best Regards,
Sang-Heon Jeon
Mike Rapoport
maintainerQuoted 7 lines · Sang-Heon Jeon
Quoted 2 lines · Hongfu Li
Return
prepare_kho_fdt()directly instead of assigning to a local and returning it on both success and failure paths.Thanks for the patch, but the same change was already posted [1]. As mentioned in the cover letter, I can send it as a separate patch if needed.
Please send it as as separate patch, as Mark requested.
Hongfu, I'm planning take that one because he was the first.
Quoted 4 lines
[1] https://lore.kernel.org/all/[email protected]/
Best Regards,
Sang-Heon Jeon
Signature · 2 lines
Sincerely yours, Mike.
Quoted 10 lines · Mike Rapoport
Quoted 6 lines · Sang-Heon Jeon
Quoted 2 lines · Hongfu Li
Return
prepare_kho_fdt()directly instead of assigning to a local and returning it on both success and failure paths.Thanks for the patch, but the same change was already posted [1]. As mentioned in the cover letter, I can send it as a separate patch if needed.
Please send it as as separate patch, as Mark requested.
Hongfu, I'm planning take that one because he was the first.
OK, understood. I withdraw this patch. Thanks.
Quoted 4 lines
Quoted 4 lines
[1] https://lore.kernel.org/all/[email protected]/
Best Regards,
Sang-Heon Jeon
Signature · 2 lines
Best regards, Hongfu