projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6e0c76
)
mm/sparse: remove redundant judgments from macro for_each_present_section_nr
author
liuq
<liuq131@chinatelecom.cn>
Fri, 7 Jul 2023 06:05:01 +0000
(14:05 +0800)
committer
Andrew Morton
<akpm@linux-foundation.org>
Fri, 18 Aug 2023 17:12:14 +0000
(10:12 -0700)
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>
mm/sparse.c
patch
|
blob
|
history
diff --git
a/mm/sparse.c
b/mm/sparse.c
index 297a8b772e8dcadb3ed69475340c1f91b403f917..77d91e565045cacdd60c8ceca8019341e499e321 100644
(file)
--- 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)