From c200a7119bc7dc9430e8287563e5343b154ff9d0 Mon Sep 17 00:00:00 2001 From: liuq Date: Fri, 7 Jul 2023 14:05:01 +0800 Subject: [PATCH] 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 Signed-off-by: Andrew Morton --- mm/sparse.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/sparse.c b/mm/sparse.c index 297a8b7..77d91e5 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) -- 2.7.4