Re: [PATCH v2] mm/memblock: drop redundant 'struct page *' argument from memblock_free_pages()

From: Mike Rapoport

Date: Tue Dec 30 2025 - 08:35:21 EST


On Mon, 29 Dec 2025 21:52:27 +0800, shengminghu512 wrote:
> memblock_free_pages() currently takes both a struct page * and the
> corresponding PFN. The page pointer is always derived from the PFN at
> call sites (pfn_to_page(pfn)), making the parameter redundant and also
> allowing accidental mismatches between the two arguments.
>
> Simplify the interface by removing the struct page * argument and
> deriving the page locally from the PFN, after the deferred struct page
> initialization check. This keeps the behavior unchanged while making
> the helper harder to misuse.
>
> [...]

Applied to for-next branch of memblock.git tree, thanks!

[1/1] mm/memblock: drop redundant 'struct page *' argument from memblock_free_pages()
commit: 42496efbfba1741fd4f1278366249bce9d34884a

tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
branch: for-next

--
Sincerely yours,
Mike.