[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a8abdc11-d008-4abb-8fa5-966ff27e1488@kernel.org>
Date: Tue, 30 Dec 2025 21:16:33 +0100
From: "David Hildenbrand (Red Hat)" <david@...nel.org>
To: shengminghu512 <shengminghu512@...com>, akpm <akpm@...ux-foundation.org>,
rppt <rppt@...nel.org>
Cc: "lorenzo.stoakes" <lorenzo.stoakes@...cle.com>,
"Liam.Howlett" <Liam.Howlett@...cle.com>, vbabka <vbabka@...e.cz>,
surenb <surenb@...gle.com>, mhocko <mhocko@...e.com>,
linux-mm <linux-mm@...ck.org>, linux-kernel <linux-kernel@...r.kernel.org>,
"hu.shengming" <hu.shengming@....com.cn>, "zhang.run" <zhang.run@....com.cn>
Subject: Re: [PATCH v2] mm/memblock: drop redundant 'struct page *' argument
from memblock_free_pages()
On 12/29/25 14:52, shengminghu512 wrote:
> From: Shengming Hu <hu.shengming@....com.cn>
>
> 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.
>
> Signed-off-by: Shengming Hu <hu.shengming@....com.cn>
> ---
Reviewed-by: David Hildenbrand (Red Hat) <david@...nel.org>
--
Cheers
David
Powered by blists - more mailing lists