Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Pratyush Yadav" <pratyush@kernel.org>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/4] memblock: rename KHO_SCRATCH to KHO_NOPRSRV
Date: Tue, 08 Sep 2026 16:13:22 +0000	[thread overview]
Message-ID: <20260908161323.2AD571F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908155639.2496551-3-pratyush@kernel.org>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Typo in the dummy fallback function for `memblock_set_kho_noprsrv_only()` when `CONFIG_KEXEC_HANDOVER` is disabled.
- [Low] Stale references to 'scratch' memory left unupdated in comments in `arch/x86/kernel/e820.c`.
--

commit 1cbb2e7144e320e54e1042768c9a90f6433c5d65
Author: Pratyush Yadav (Google) <pratyush@kernel.org>

memblock: rename KHO_SCRATCH to KHO_NOPRSRV

This commit renames the vague MEMBLOCK_KHO_SCRATCH flag to MEMBLOCK_KHO_NOPRSRV
to better reflect that it represents memory with no preservations during early
KHO boot. It updates the memblock functions and comments accordingly.

> diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
> index eb72537bc0b19..2a6e19f952517 100644
> --- a/arch/x86/kernel/e820.c
> +++ b/arch/x86/kernel/e820.c
> @@ -1363,7 +1363,7 @@ __init void e820__memblock_setup(void)
>  	 * After real mode trampoline is allocated, we clear that scratch
>  	 * marking.
>  	 */

[Severity: Low]
This isn't a bug, but should the block comment here in e820__memblock_setup()
also be updated? It still refers to "scratch marking" and earlier in the block
to "scratch memory", which seems to miss the commit's intent to update memblock
comments to use "noprsrv".

> -	memblock_mark_kho_scratch(0, SZ_1M);
> +	memblock_mark_kho_noprsrv(0, SZ_1M);
>  
>  	/*
>  	 * 32-bit systems are limited to 4BG of memory even with HIGHMEM and

[ ... ]

> diff --git a/include/linux/memblock.h b/include/linux/memblock.h
> index db3b106c63351..186b965cfc896 100644
> --- a/include/linux/memblock.h
> +++ b/include/linux/memblock.h

[ ... ]

> @@ -615,11 +615,11 @@ static inline void memtest_report_meminfo(struct seq_file *m) { }
>  #endif
>  
>  #ifdef CONFIG_KEXEC_HANDOVER
> -void memblock_set_kho_scratch_only(void);
> -void memblock_clear_kho_scratch_only(void);
> +void memblock_set_kho_noprsrv_only(void);
> +void memblock_clear_kho_noprsrv_only(void);
>  #else
> -static inline void memblock_set_kho_scratch_only(void) { }
> -static inline void memblock_clear_kho_scratch_only(void) { }
> +static inline void memblock_set_kho_noprsev_only(void) { }

[Severity: Low]
Is there a typo in the name of this dummy fallback function? It is named
memblock_set_kho_noprsev_only (with 'ev' instead of 'rv').

Could this cause a build failure due to a missing function declaration if code
compiled without CONFIG_KEXEC_HANDOVER attempts to call
memblock_set_kho_noprsrv_only()?

> +static inline void memblock_clear_kho_noprsrv_only(void) { }
>  #endif
>  
>  #endif /* _LINUX_MEMBLOCK_H */

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260908155639.2496551-1-pratyush@kernel.org?part=2

  reply	other threads:[~2026-09-08 16:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08 15:56 [PATCH v2 0/4] kho: rename "scratch" to "bootmem" Pratyush Yadav
2026-09-08 15:56 ` [PATCH v2 1/4] memblock: get rid of CONFIG_MEMBLOCK_KHO_SCRATCH Pratyush Yadav
2026-09-08 15:56 ` [PATCH v2 2/4] memblock: rename KHO_SCRATCH to KHO_NOPRSRV Pratyush Yadav
2026-09-08 16:13   ` sashiko-bot [this message]
2026-09-08 15:56 ` [PATCH v2 3/4] kho: rename KHO scratch to KHO bootmem Pratyush Yadav
2026-09-08 16:22   ` sashiko-bot
2026-09-08 15:56 ` [PATCH v2 4/4] kho: rename kho_scratch= commandline parameter to kho_bootmem= Pratyush Yadav
2026-09-08 16:38   ` sashiko-bot

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=20260908161323.2AD571F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=pratyush@kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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