Message ID | 20200318174509.15021-1-mateusznosek0@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mm/compaction.c: Clean code by removing unnecessary assignment | expand |
On 3/18/20 6:45 PM, mateusznosek0@gmail.com wrote: > 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> Acked-by: Vlastimil Babka <vbabka@suse.cz> > --- > 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) { >
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) {