Linux CXL
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
Cc: linux-cxl@vger.kernel.org
Subject: Re: [PATCH 1/3] mm: split out mm_init and memblock declarations from internal.h
Date: Thu, 09 Jul 2026 06:57:12 +0000	[thread overview]
Message-ID: <20260709065713.6C0F51F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260709-internal-h-v1-1-956d5092782d@kernel.org>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] Missing semicolon at the end of the `memmap_init_range()` function declaration in the new `mm/mm_init.h` header file.
- [Low] `mm/sparse.c` fails to compile because it lacks `#include "mm_init.h"`, resulting in undeclared identifiers and potential implicit declarations.
--

--- Patch [1]: [PATCH 1/3] mm: split out mm_init and memblock declarations from internal.h ---
commit 13783d4d0cf38a0ede9798e1d71f8e2fb2de5d3d
Author: Mike Rapoport (Microsoft) <rppt@kernel.org>

mm: split out mm_init and memblock declarations from internal.h

This commit moves declarations related to mm/mm_init.c and mm/memblock.c
from mm/internal.h to a new mm/mm_init.h header file to reduce bloat.

> diff --git a/mm/internal.h b/mm/internal.h
> index 5c94d1bd7b930..c514b17c61b87 100644
> --- a/mm/internal.h
> +++ b/mm/internal.h
[ ... ]
> @@ -820,14 +807,6 @@ static inline void init_compound_tail(struct page *tail,
>  	prep_compound_tail(tail, head, order);
>  }
>  
> -extern void *memmap_alloc(phys_addr_t size, phys_addr_t align,
> -			  phys_addr_t min_addr,
> -			  int nid, bool exact_nid);
> -
> -void memmap_init_range(unsigned long, int, unsigned long, unsigned long,
> -		unsigned long, enum meminit_context, struct vmem_altmap *, int,
> -		bool);
> -

[Severity: Low]
Since these declarations are moved to mm/mm_init.h, will mm/sparse.c fail to 
compile? It appears __populate_section_memmap() relies on memmap_alloc(), and
mminit_validate_memmodel_limits() relies on mminit_dprintk(), but the patch
doesn't add an include for mm_init.h in mm/sparse.c.

>  /*
>   * mm/sparse.c
>   */
[ ... ]
> diff --git a/mm/mm_init.h b/mm/mm_init.h
> new file mode 100644
> index 0000000000000..118f88c523c95
> --- /dev/null
> +++ b/mm/mm_init.h
[ ... ]
> +void *memmap_alloc(phys_addr_t size, phys_addr_t align, phys_addr_t min_addr,
> +		int nid, bool exact_nid);
> +
> +void memmap_init_range(unsigned long size, int nid, unsigned long zone,
> +		unsigned long start_pfn, unsigned long zone_end_pfn,
> +		enum meminit_context context,
> +		struct vmem_altmap *altmap, int migratetype,
> +		bool isolate_pageblock)

[Severity: Low]
Does this declaration cause a syntax error because it is missing a semicolon
at the end?

> +
> +#if defined CONFIG_COMPACTION || defined CONFIG_CMA
> +/* Free whole pageblock and set its migration type to MIGRATE_CMA. */
> +void init_cma_reserved_pageblock(struct page *page);
> +#endif

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260709-internal-h-v1-0-956d5092782d@kernel.org?part=1

  reply	other threads:[~2026-07-09  6:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09  6:41 [PATCH 0/3] mm: split a couple of headers from internal.h Mike Rapoport (Microsoft)
2026-07-09  6:41 ` [PATCH 1/3] mm: split out mm_init and memblock declarations " Mike Rapoport (Microsoft)
2026-07-09  6:57   ` sashiko-bot [this message]
2026-07-09  7:21     ` Mike Rapoport
2026-07-09  6:41 ` [PATCH 2/3] mm: split out sparse " Mike Rapoport (Microsoft)
2026-07-09  6:41 ` [PATCH 3/3] mm: split out vmalloc " Mike Rapoport (Microsoft)
2026-07-09  7:22 ` [PATCH 0/3] mm: split a couple of headers " Mike Rapoport
2026-07-09  7:48   ` Muchun Song

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=20260709065713.6C0F51F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=rppt@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