From: Hao Lee <haolee.swjtu@gmail.com>
To: akpm@linux-foundation.org
Cc: vbabka@suse.cz, mgorman@techsingularity.net, mhocko@suse.com,
hannes@cmpxchg.org, iamjoonsoo.kim@lge.com, minchan@kernel.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Hao Lee <haolee.swjtu@gmail.com>
Subject: [PATCH] mm: remove a redundant condition in the for loop
Date: Mon, 19 Jun 2017 21:54:18 +0800 [thread overview]
Message-ID: <20170619135418.8580-1-haolee.swjtu@gmail.com> (raw)
The variable current_order decreases from MAX_ORDER-1 to order, so the
condition current_order <= MAX_ORDER-1 is always true.
Signed-off-by: Hao Lee <haolee.swjtu@gmail.com>
---
mm/page_alloc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 2302f25..9120c2b 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2215,9 +2215,8 @@ __rmqueue_fallback(struct zone *zone, unsigned int order, int start_migratetype)
bool can_steal;
/* Find the largest possible block of pages in the other list */
- for (current_order = MAX_ORDER-1;
- current_order >= order && current_order <= MAX_ORDER-1;
- --current_order) {
+ for (current_order = MAX_ORDER-1; current_order >= order;
+ --current_order) {
area = &(zone->free_area[current_order]);
fallback_mt = find_suitable_fallback(area, current_order,
start_migratetype, false, &can_steal);
--
2.9.3
next reply other threads:[~2017-06-19 13:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-19 13:54 Hao Lee [this message]
2017-06-19 14:17 ` Vlastimil Babka
2017-06-19 19:05 ` Rasmus Villemoes
2017-06-19 20:23 ` Vlastimil Babka
2017-06-20 1:39 ` Hao Lee
2017-06-21 9:43 ` Michal Hocko
2017-06-21 18:55 ` [PATCH] mm/page_alloc.c: eliminate unsigned confusion in __rmqueue_fallback Rasmus Villemoes
2017-06-23 12:22 ` Michal Hocko
2017-06-23 13:10 ` Vlastimil Babka
2017-06-24 13:26 ` Wei Yang
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=20170619135418.8580-1-haolee.swjtu@gmail.com \
--to=haolee.swjtu@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=vbabka@suse.cz \
/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
all inboxes | Powered by JetHome®