aboutsummaryrefslogtreecommitdiffstats
path: root/mm/sparse.c
diff options
context:
space:
mode:
authorliuq <[email protected]>2023-07-07 06:05:01 +0000
committerAndrew Morton <[email protected]>2023-08-18 17:12:14 +0000
commitc200a7119bc7dc9430e8287563e5343b154ff9d0 (patch)
treed88bd41c439e2b85cbf0d5f0e600ff67ea277b3e /mm/sparse.c
parentmm: compaction: skip the memory hole rapidly when isolating free pages (diff)
downloadkernel-c200a7119bc7dc9430e8287563e5343b154ff9d0.tar.gz
kernel-c200a7119bc7dc9430e8287563e5343b154ff9d0.zip
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/[email protected] Signed-off-by: liuq <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
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)