Re: [PATCH 3/3] mm: sparse: remove __section_nr() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02.07.21 14:18, Michal Hocko wrote:
On Fri 02-07-21 18:41:32, Ohhoon Kwon wrote:
__section_nr() was used to convert struct mem_section * to section_nr.

With CONFIG_SPARSEMEM_EXTREME enabled, however, __section_nr() can be
costly since it iterates all section roots to check if the given
mem_section is in its range.

On the other hand, __nr_to_section() which converts section_nr to
mem_section can be done in O(1).

The only users of __section_nr() was section_mark_present() and
find_memory_block().

Since I changed both functions to use section_nr directly in the
preceeding patches, let's remove __section_nr() which has no users.

Signed-off-by: Ohhoon Kwon <ohoono.kwon@xxxxxxxxxxx>

I would go with a much shorter changelog. The function is not used
anymore so it can be simply dropped.
Acked-by: Michal Hocko <mhocko@xxxxxxxx>

Agreed, also avoid the use of "I" in patches.

Use something like

"As the last users of __section_nr() are gone, let's remove now unused __section_nr()."

Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>


--
Thanks,

David / dhildenb





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux