Re: [PATCH 05/12] mm/sparse: cleanup sparse_init_one_section()
From: Lorenzo Stoakes (ARM)
Date: Thu Sep 10 2026 - 09:58:50 EST
On Wed, Sep 09, 2026 at 03:32:58PM +0200, David Hildenbrand (Arm) wrote:
> Let's avoid the "pnum" terminology.
>
> Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
Yup it's gross! LGTM so:
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>
> ---
> mm/sparse.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/sparse.h b/mm/sparse.h
> index 049272aba84e5..744ae29002f5e 100644
> --- a/mm/sparse.h
> +++ b/mm/sparse.h
> @@ -90,7 +90,7 @@ void sparse_sections_init(void);
> int sparse_index_init(unsigned long section_nr, int nid);
>
> static inline void sparse_init_one_section(struct mem_section *ms,
> - unsigned long pnum, struct page *mem_map,
> + unsigned long section_nr, struct page *mem_map,
> struct mem_section_usage *usage, unsigned long flags)
> {
> unsigned long coded_mem_map;
> @@ -102,7 +102,7 @@ static inline void sparse_init_one_section(struct mem_section *ms,
> * page_to_pfn() on !CONFIG_SPARSEMEM_VMEMMAP can simply subtract it
> * from the page pointer to obtain the PFN.
> */
> - coded_mem_map = (unsigned long)(mem_map - section_nr_to_pfn(pnum));
> + coded_mem_map = (unsigned long)(mem_map - section_nr_to_pfn(section_nr));
> VM_WARN_ON_ONCE(coded_mem_map & ~SECTION_MAP_MASK);
>
> ms->section_mem_map &= ~SECTION_MAP_MASK;
>
> --
> 2.43.0
>
--
Cheers, Lorenzo