From: mateusznosek0@gmail.com
To: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Cc: Mateusz Nosek <mateusznosek0@gmail.com>, akpm@linux-foundation.org
Subject: [PATCH] mm/compaction.c: Clean code by removing unnecessary assignment
Date: Wed, 18 Mar 2020 18:45:09 +0100 [thread overview]
Message-ID: <20200318174509.15021-1-mateusznosek0@gmail.com> (raw)
From: Mateusz Nosek <mateusznosek0@gmail.com>
Previously 0 was assigned to variable 'last_migrated_pfn'. But the
variable is not read after that, so the assignment can be removed.
Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
---
mm/compaction.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/mm/compaction.c b/mm/compaction.c
index 827d8a2b3164..4576d6c5afb5 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -2183,7 +2183,6 @@ compact_zone(struct compact_control *cc, struct capture_control *capc)
ret = COMPACT_CONTENDED;
putback_movable_pages(&cc->migratepages);
cc->nr_migratepages = 0;
- last_migrated_pfn = 0;
goto out;
case ISOLATE_NONE:
if (update_cached) {
--
2.17.1
next reply other threads:[~2020-03-18 17:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-18 17:45 mateusznosek0 [this message]
2020-03-20 17:28 ` [PATCH] mm/compaction.c: Clean code by removing unnecessary assignment Vlastimil Babka
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=20200318174509.15021-1-mateusznosek0@gmail.com \
--to=mateusznosek0@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).