From: Mateusz Nosek Date: Thu, 2 Apr 2020 04:10:45 +0000 (-0700) Subject: mm/compaction.c: clean code by removing unnecessary assignment X-Git-Tag: v5.15~4178^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=250046e7ba2a02ea7c2b9e65a22fe83338b07fdf;p=platform%2Fkernel%2Flinux-starfive.git mm/compaction.c: clean code by removing unnecessary assignment 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 Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Acked-by: Vlastimil Babka Cc: Mel Gorman Link: http://lkml.kernel.org/r/20200318174509.15021-1-mateusznosek0@gmail.com Signed-off-by: Linus Torvalds --- diff --git a/mm/compaction.c b/mm/compaction.c index c589ead..df3da2f 100644 --- a/mm/compaction.c +++ b/mm/compaction.c @@ -2182,7 +2182,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) {