From: liuq <liuq131@chinatelecom.cn>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
liuq <liuq131@chinatelecom.cn>
Subject: [PATCH] mm/sparse: remove redundant judgments from macro for_each_present_section_nr
Date: Fri, 7 Jul 2023 14:05:01 +0800 [thread overview]
Message-ID: <20230707060501.29184-1-liuq131@chinatelecom.cn> (raw)
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
next reply other threads:[~2023-07-07 6:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-07 6:05 liuq [this message]
2023-07-07 15:17 ` [PATCH] mm/sparse: remove redundant judgement " Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230707060501.29184-1-liuq131@chinatelecom.cn \
--to=liuq131@chinatelecom.cn \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox