Thread (60 messages) 60 messages, 8 authors, 2026-03-11

Re: [PATCH v1 11/16] mm/memory: inline unmap_page_range() into __zap_vma_range()

From: "David Hildenbrand (Arm)" <david@kernel.org>
Date: 2026-03-11 09:20:28
Also in: bpf, dri-devel, intel-gfx, kvm, linux-fsdevel, linux-mm, linux-perf-users, linux-rdma, linux-s390, linuxppc-dev, lkml, rust-for-linux
Subsystem: memory management, memory management - core, the rest · Maintainers: Andrew Morton, David Hildenbrand, Linus Torvalds

quoted
Tells me that "cur" is rather common.
quoted
It's not a big deal, but why not addr?
Good question, I can just do that. :)
Thanks!

@Andrew, the following fixup on top

From 8470e94c57b89819753c8f31e23320f33c14cd58 Mon Sep 17 00:00:00 2001
From: "David Hildenbrand (Arm)" <david@kernel.org>
Date: Wed, 11 Mar 2026 10:19:00 +0100
Subject: [PATCH] fixup: mm/memory: inline unmap_page_range() into
 __zap_vma_range()

Let's call the local variable simply "addr".

Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
---
 mm/memory.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/mm/memory.c b/mm/memory.c
index 1c0bcdfc73b7..5f7607140de1 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2081,17 +2081,17 @@ static void __zap_vma_range(struct mmu_gather *tlb, struct vm_area_struct *vma,
 			return;
 		__unmap_hugepage_range(tlb, vma, start, end, NULL, zap_flags);
 	} else {
-		unsigned long next, cur = start;
+		unsigned long next, addr = start;
 		pgd_t *pgd;
 
 		tlb_start_vma(tlb, vma);
-		pgd = pgd_offset(vma->vm_mm, cur);
+		pgd = pgd_offset(vma->vm_mm, addr);
 		do {
-			next = pgd_addr_end(cur, end);
+			next = pgd_addr_end(addr, end);
 			if (pgd_none_or_clear_bad(pgd))
 				continue;
-			next = zap_p4d_range(tlb, vma, pgd, cur, next, details);
-		} while (pgd++, cur = next, cur != end);
+			next = zap_p4d_range(tlb, vma, pgd, addr, next, details);
+		} while (pgd++, addr = next, addr != end);
 		tlb_end_vma(tlb, vma);
 	}
 }
-- 
2.43.0


-- 
Cheers,

David
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help