mm/sparse.c: check __highest_present_section_nr only for a present section
[linux-2.6-microblaze.git] / mm / sparse.c
index 73dc2fc..3570ff2 100644 (file)
@@ -190,15 +190,13 @@ static inline int next_present_section_nr(int section_nr)
                section_nr++;
                if (present_section_nr(section_nr))
                        return section_nr;
-       } while ((section_nr < NR_MEM_SECTIONS) &&
-                (section_nr <= __highest_present_section_nr));
+       } while ((section_nr <= __highest_present_section_nr));
 
        return -1;
 }
 #define for_each_present_section_nr(start, section_nr)         \
        for (section_nr = next_present_section_nr(start-1);     \
             ((section_nr >= 0) &&                              \
-             (section_nr < NR_MEM_SECTIONS) &&                 \
              (section_nr <= __highest_present_section_nr));    \
             section_nr = next_present_section_nr(section_nr))