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>