[lkml]   [2021]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/3] mm: sparse: remove __section_nr() function
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 <>
> I would go with a much shorter changelog. The function is not used
> anymore so it can be simply dropped.
> Acked-by: Michal Hocko <>

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

Reviewed-by: David Hildenbrand <>


David / dhildenb

 \ /
  Last update: 2021-07-02 19:58    [W:0.065 / U:0.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site