Skip to contentSkip to conversation

mm/memblock: simplify reserve_mem_init error handling

PATCH In review Hongfu Li 3 participants 4 messages Aug 21 – Aug 24

Subsystems (2)
lore
Share & tools
lore

Hongfu Li

author
#0 lore raw

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
index 777c69f05400..7079b93ec730 100644
@@ -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
#1 lore raw
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

maintainer
#2 lore raw
Quoted 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.
author
#3 lore raw
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