Skip to contentSkip to conversation

mm-migrate-remove-redundant-variables-used-in-a-for-loop.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jan 20, 2022

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: mm/migrate: remove redundant variables used in a for-loop
has been removed from the -mm tree. Its filename was
mm-migrate-remove-redundant-variables-used-in-a-for-loop.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Colin Ian King <[email protected]>
Subject: mm/migrate: remove redundant variables used in a for-loop

The variable addr is being set and incremented in a for-loop but not actually being used. It is redundant and so addr and also variable start can be removed.

---

 mm/migrate.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
mm/migrate.c renamed from mm/migrate.c~mm-migrate-remove-redundant-variables-used-in-a-for-loop +2 -3
@@ -2481,8 +2481,7 @@ static bool migrate_vma_check_page(struc
 static void migrate_vma_unmap(struct migrate_vma *migrate)
 {
 	const unsigned long npages = migrate->npages;
-	const unsigned long start = migrate->start;
-	unsigned long addr, i, restore = 0;
+	unsigned long i, restore = 0;
 	bool allow_drain = true;
 
 	lru_add_drain();
@@ -2528,7 +2527,7 @@ static void migrate_vma_unmap(struct mig
 		}
 	}
 
-	for (addr = start, i = 0; i < npages && restore; addr += PAGE_SIZE, i++) {
+	for (i = 0; i < npages && restore; i++) {
 		struct page *page = migrate_pfn_to_page(migrate->src[i]);
 
 		if (!page || (migrate->src[i] & MIGRATE_PFN_MIGRATE))

_

Patches currently in -mm which might be from [email protected] are

kernel-sysctlc-remove-unused-variable-ten_thousand.patch