diff options
| author | 2021-09-02 14:57:04 -0700 | |
|---|---|---|
| committer | 2021-09-03 09:58:14 -0700 | |
| commit | 11e02d3729da1a2d4a33db5ea61291770d411884 (patch) | |
| tree | 285cdb3257527e880766f57bca3c9c6472f726ea /mm/sparse.c | |
| parent | mm: sparse: pass section_nr to find_memory_block (diff) | |
| download | linux-dev-11e02d3729da1a2d4a33db5ea61291770d411884.tar.xz linux-dev-11e02d3729da1a2d4a33db5ea61291770d411884.zip  | |
mm: sparse: remove __section_nr() function
As the last users of __section_nr() are gone, let's remove unused function
__section_nr().
Link: https://lkml.kernel.org/r/20210707150212.855-4-ohoono.kwon@samsung.com
Signed-off-by: Ohhoon Kwon <ohoono.kwon@samsung.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Baoquan He <bhe@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/sparse.c')
| -rw-r--r-- | mm/sparse.c | 26 | 
1 files changed, 0 insertions, 26 deletions
diff --git a/mm/sparse.c b/mm/sparse.c index 8018ee7fcda5..d85655242ed9 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -109,32 +109,6 @@ static inline int sparse_index_init(unsigned long section_nr, int nid)  }  #endif -#ifdef CONFIG_SPARSEMEM_EXTREME -unsigned long __section_nr(struct mem_section *ms) -{ -	unsigned long root_nr; -	struct mem_section *root = NULL; - -	for (root_nr = 0; root_nr < NR_SECTION_ROOTS; root_nr++) { -		root = __nr_to_section(root_nr * SECTIONS_PER_ROOT); -		if (!root) -			continue; - -		if ((ms >= root) && (ms < (root + SECTIONS_PER_ROOT))) -		     break; -	} - -	VM_BUG_ON(!root); - -	return (root_nr * SECTIONS_PER_ROOT) + (ms - root); -} -#else -unsigned long __section_nr(struct mem_section *ms) -{ -	return (unsigned long)(ms - mem_section[0]); -} -#endif -  /*   * During early boot, before section_mem_map is used for an actual   * mem_map, we use section_mem_map to store the section's NUMA  | 
