From: Pasha Tatashin <pasha.tatashin@soleen.com>
To: ranxiaokai627@163.com
Cc: graf@amazon.com, rppt@kernel.org, pratyush@kernel.org,
akpm@linux-foundation.org, kexec@lists.infradead.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
ran.xiaokai@zte.com.cn
Subject: Re: [PATCH -next 2/2] kho: remove unnecessary WARN_ON(err) in kho_populate()
Date: Sat, 7 Feb 2026 12:34:08 -0500 [thread overview]
Message-ID: <CA+CK2bCW9fNShn=BUuje3tAnSydCQoKw-7TXYK9HahO5DvZqUA@mail.gmail.com> (raw)
In-Reply-To: <20260206043121.197564-3-ranxiaokai627@163.com>
On Thu, Feb 5, 2026 at 11:31 PM <ranxiaokai627@163.com> wrote:
>
> From: Ran Xiaokai <ran.xiaokai@zte.com.cn>
>
> The following pr_warn() provides detailed error and location
> information, WARN_ON(err) adds no additional debugging value,
> so remove the redundant WARN_ON() call.
>
> Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
> ---
> kernel/liveupdate/kexec_handover.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/liveupdate/kexec_handover.c b/kernel/liveupdate/kexec_handover.c
> index 76b714db175d..b851b09a8e99 100644
> --- a/kernel/liveupdate/kexec_handover.c
> +++ b/kernel/liveupdate/kexec_handover.c
> @@ -1507,7 +1507,7 @@ void __init kho_populate(phys_addr_t fdt_phys, u64 fdt_len,
>
> memblock_add(area->addr, size);
> err = memblock_mark_kho_scratch(area->addr, size);
> - if (WARN_ON(err)) {
> + if (err) {
> pr_warn("failed to mark the scratch region 0x%pa+0x%pa: %pe",
> &area->addr, &size, ERR_PTR(err));
> goto err_unmap_scratch;
> --
> 2.25.1
>
>
>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
next prev parent reply other threads:[~2026-02-07 17:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-06 4:31 [PATCH -next 0/2] two fixes " ranxiaokai627
2026-02-06 4:31 ` [PATCH -next 1/2] kho: fix missing early_memunmap() call " ranxiaokai627
2026-02-10 13:45 ` Pratyush Yadav
2026-02-11 1:23 ` ranxiaokai627
2026-02-06 4:31 ` [PATCH -next 2/2] kho: remove unnecessary WARN_ON(err) " ranxiaokai627
2026-02-07 17:34 ` Pasha Tatashin [this message]
2026-02-10 13:45 ` Pratyush Yadav
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='CA+CK2bCW9fNShn=BUuje3tAnSydCQoKw-7TXYK9HahO5DvZqUA@mail.gmail.com' \
--to=pasha.tatashin@soleen.com \
--cc=akpm@linux-foundation.org \
--cc=graf@amazon.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pratyush@kernel.org \
--cc=ran.xiaokai@zte.com.cn \
--cc=ranxiaokai627@163.com \
--cc=rppt@kernel.org \
/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