mm: sparse: remove __section_nr() function
[linux-2.6-microblaze.git] / mm / sparse.c
index 8018ee7..d856552 100644 (file)
@@ -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