From: liuq Date: Fri, 7 Jul 2023 06:05:01 +0000 (+0800) Subject: mm/sparse: remove redundant judgments from macro for_each_present_section_nr X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=c200a7119bc7dc9430e8287563e5343b154ff9d0;p=tomoyo%2Ftomoyo-test1.git 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 --- 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)