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

From: David Hildenbrand (Arm)

Date: Fri Mar 20 2026 - 15:04:33 EST


On 3/18/26 09:46, Mike Rapoport wrote:
> 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?

Given that I am placing it next to sparse_init(), yes I want 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/

Well, these are all internal helpers in mm/sparse.c, not exposed to
other MM bits. :)

>
> etc
>
>> Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
>
> Reviewed-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>

Thanks!

--
Cheers,

David