linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/compaction.c: Clean code by removing unnecessary assignment
@ 2020-03-18 17:45 mateusznosek0
  2020-03-20 17:28 ` Vlastimil Babka
  0 siblings, 1 reply; 2+ messages in thread
From: mateusznosek0 @ 2020-03-18 17:45 UTC (permalink / raw)
  To: linux-kernel, linux-mm; +Cc: Mateusz Nosek, akpm

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm/compaction.c: Clean code by removing unnecessary assignment
  2020-03-18 17:45 [PATCH] mm/compaction.c: Clean code by removing unnecessary assignment mateusznosek0
@ 2020-03-20 17:28 ` Vlastimil Babka
  0 siblings, 0 replies; 2+ messages in thread
From: Vlastimil Babka @ 2020-03-20 17:28 UTC (permalink / raw)
  To: mateusznosek0, linux-kernel, linux-mm; +Cc: akpm

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) {
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-20 17:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-18 17:45 [PATCH] mm/compaction.c: Clean code by removing unnecessary assignment mateusznosek0
2020-03-20 17:28 ` Vlastimil Babka

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).