From: Sang-Heon Jeon <ekffu200098@gmail.com>
To: Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>
Cc: Sang-Heon Jeon <ekffu200098@gmail.com>,
"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
Nicholas Piggin <npiggin@gmail.com>
Subject: [PATCH 3/5] powerpc/fadump: remove unreachable memblock_reserve() return value checks
Date: Wed, 17 Jun 2026 03:29:54 +0900 [thread overview]
Message-ID: <20260616182959.2429774-4-ekffu200098@gmail.com> (raw)
In-Reply-To: <20260616182959.2429774-1-ekffu200098@gmail.com>
fadump_append_bootargs() and fadump_reserve_mem() both run from
early_init_devtree(), before it calls memblock_allow_resize(). At that
point memblock_reserve() either succeeds or panics, never returning an
error.
Therefore the return value checks are unreachable, so remove them and the
related logic.
No functional change.
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
arch/powerpc/kernel/fadump.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index a313b1653124..88ca6156b81a 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -154,13 +154,8 @@ void __init fadump_append_bootargs(void)
if (!fw_dump.dump_active || !fw_dump.param_area_supported || !fw_dump.param_area)
return;
- if (fw_dump.param_area < fw_dump.boot_mem_top) {
- if (memblock_reserve(fw_dump.param_area, COMMAND_LINE_SIZE)) {
- pr_warn("WARNING: Can't use additional parameters area!\n");
- fw_dump.param_area = 0;
- return;
- }
- }
+ if (fw_dump.param_area < fw_dump.boot_mem_top)
+ memblock_reserve(fw_dump.param_area, COMMAND_LINE_SIZE);
append_args = (char *)fw_dump.param_area;
len = strlen(boot_command_line);
@@ -632,10 +627,7 @@ int __init fadump_reserve_mem(void)
(fw_dump.ops->fadump_setup_metadata(&fw_dump) < 0))
goto error_out;
- if (memblock_reserve(base, size)) {
- pr_err("Failed to reserve memory!\n");
- goto error_out;
- }
+ memblock_reserve(base, size);
pr_info("Reserved %lldMB of memory at %#016llx (System RAM: %lldMB)\n",
(size >> 20), base, (memblock_phys_mem_size() >> 20));
--
2.43.0
next prev parent reply other threads:[~2026-06-16 18:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-16 18:29 [PATCH 0/5] treewide: remove unreachable memblock_reserve() return value checks in early boot Sang-Heon Jeon
2026-06-16 18:29 ` Sang-Heon Jeon [this message]
2026-06-17 9:27 ` [PATCH 3/5] powerpc/fadump: remove unreachable memblock_reserve() return value checks Mukesh Kumar Chaurasiya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260616182959.2429774-4-ekffu200098@gmail.com \
--to=ekffu200098@gmail.com \
--cc=chleroy@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=npiggin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox