lkml.org 
[lkml]   [2023]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] mm/sparse: remove redundant judgments from macro for_each_present_section_nr
Date
The next_present_section_nr function has already ensured
that 'section_nr<=__highest_present_section_nr',
so this conditional judgment is removed.

Signed-off-by: liuq <liuq131@chinatelecom.cn>
---
mm/sparse.c | 3 +--
1 file changed, 1 insertion(+), 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)
--
2.27.0
\
 
 \ /
  Last update: 2023-07-07 08:18    [W:0.031 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site