summaryrefslogtreecommitdiff
path: root/mm/sparse.c
diff options
context:
space:
mode:
authorliuq <liuq131@chinatelecom.cn>2023-07-07 14:05:01 +0800
committerAndrew Morton <akpm@linux-foundation.org>2023-08-18 10:12:14 -0700
commitc200a7119bc7dc9430e8287563e5343b154ff9d0 (patch)
treed88bd41c439e2b85cbf0d5f0e600ff67ea277b3e /mm/sparse.c
parente6e0c7673012f42c6fb8d89af71cd7607c93e0a5 (diff)
mm/sparse: remove redundant judgments from macro for_each_present_section_nr
next_present_section_nr() has already ensured that 'section_nr<=__highest_present_section_nr', so this check is removed. Link: https://lkml.kernel.org/r/20230707060501.29184-1-liuq131@chinatelecom.cn Signed-off-by: liuq <liuq131@chinatelecom.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/sparse.c')
-rw-r--r--mm/sparse.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/sparse.c b/mm/sparse.c
index 297a8b772e8d..77d91e565045 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -172,8 +172,7 @@ static void __section_mark_present(struct mem_section *ms,
#define for_each_present_section_nr(start, section_nr) \
for (section_nr = next_present_section_nr(start-1); \
- ((section_nr != -1) && \
- (section_nr <= __highest_present_section_nr)); \
+ section_nr != -1; \
section_nr = next_present_section_nr(section_nr))
static inline unsigned long first_present_section_nr(void)