Re: [PATCH 10/14] mm: prepare to move subsection_map_init() to mm/sparse-vmemmap.c

Mike Rapoport
2026-03-18T08:46:48Z

On Tue, Mar 17, 2026 at 05:56:48PM +0100, David Hildenbrand (Arm) wrote:
> We want to move subsection_map_init() to mm/sparse-vmemmap.c.
>
> To prepare for getting rid of subsection_map_init() in mm/sparse.c
> completely, use a static inline function for !CONFIG_SPARSEMEM_VMEMMAP.
>
> While at it, move the declaration to internal.h and rename it to
> "sparse_init_subsection_map()".

Do we really need to rename it?

Maybe add a "global renaming patch on top, like

s/clear_subsection_map/subsection_map_clear/
s/fill_subsection_map/subsection_map_fill/

etc

> Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

> ---
> include/linux/mmzone.h | 3 ---
> mm/internal.h | 12 ++++++++++++
> mm/mm_init.c | 2 +-
> mm/sparse.c | 6 +-----
> 4 files changed, 14 insertions(+), 9 deletions(-)

--
Sincerely yours,
Mike.